Hi, new here so I hope you guys will help me out with this.
I have been tearing out my hair over this problem.
I have a wordpress site that i combine with another script.
The root of the domain is my wordpress blog.
The script i got in different folders ie /uk/,/en/,/se/ and so on.
The script is including the wordpress header,sidebar and footer to make it become a part of the wordpress site, so far so good.
But the my problem is that each folder has a different menu that i would like to include in the wordpress sidebar.
So what i would like to do is something like this
if url = mysite.com/uk
then $sidebar = uk_sidebar
elseif url =mysite.com/se
then $sidebar = se_sidebar
else
then $sidebar = wordpress_sidebar
But i am unable to check the url from the sidebar.
Any ideas on how I can accomplish this?
I would really appreciate all ideas.
Howard
Sidebar content based on url
Moderator: General Moderators
Re: Sidebar content based on url
Code: Select all
$url = $_SERVER['PHP_SELF'];
http://us3.php.net/manual/en/reserved.v ... server.php