|
Haven't registered yet? Do it here now!
|
AnneT
Joined: 24 Oct 2007 Posts: 13
|
|
|
|
|
|
|
Posted: Sun Nov 04, 2007 7:02 am Post subject: Wordpress: php include in sidebar text widget |
|
|
|
|
|
|
|
|
|
|
Does anyone know how to insert the php include into the text widget in the Wordpress sidebar?
I've tried it but it doesn't work. I can only make the php work if I code it into the sidebar.php template. |
|
|
|
|
|
|
|
AnneT
Joined: 24 Oct 2007 Posts: 13
|
|
|
|
|
|
|
Posted: Sun Nov 04, 2007 11:30 am Post subject: |
|
|
|
|
|
|
|
|
|
|
Never mind. I worked something out |
|
|
|
|
|
|
|
topten
Joined: 06 Sep 2007 Posts: 37
|
|
|
|
|
|
|
Posted: Sun Nov 25, 2007 11:29 am Post subject: |
|
|
|
|
|
|
|
|
|
|
I was looking at this myself today Anne, what did you end up doing if I may ask? |
|
|
|
|
|
|
|
porn24
Joined: 30 Mar 2007 Posts: 12
|
|
|
|
|
|
|
Posted: Sun Nov 25, 2007 7:22 pm Post subject: Re: Wordpress: php include in sidebar text widget |
|
|
|
|
|
|
|
|
|
|
You need to go get the Widgetize Anything plugin. It will create a widget just like a text widget, but won't delete php code when entered. http://www.erik-rasmussen.com/blog/2006/11/30/widgetize-anything/ You can create several as well if you want. Then insert your php code in the widget.
Something like
@ini_set('expose_php', 'Off');
@include "http://www.domainname.com/lo/site_templates/site_1_1.php";
Thats it, no need for the front and back part of the php line. That is included in the widget. Just enter the guts of the include.
That way you can use the lo in a widget and not hardcoded into the sidebar.
AnneT wrote: | Does anyone know how to insert the php include into the text widget in the Wordpress sidebar?
I've tried it but it doesn't work. I can only make the php work if I code it into the sidebar.php template. |
|
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|
|
|
|
| |