Sidebar content based on url

Discussion in 'PHP' started by Howardno, Apr 22, 2009.

  1. #1
    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
     
    Howardno, Apr 22, 2009 IP