• Resolved marcusto

    (@marcusto)


    I am trying to include different sidebar combinations on a new project:

    http://www.whatsbetweenthesheets.com/index.php

    And for some reason on some pages (it seems random everytime I mess with the source code) it will display a condition it shouldn’t. Each page should have only two content boxes in the sidebar but some how some pages get two from another page.

    The copy in the content box is coming from a Page Excerpt…Yes I know Pages don’t have excerpts but I found another post here that helped me add them…maybe that’s the issue.

    Any help is very apprciated.

    Here’s the sidebar code:

    [Moderated: Removed that large amount of code. Please consider using a pastebin service such as http://wordpress.pastebin.ca/ and posting a link back to the code]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter marcusto

    (@marcusto)

    OK,

    Here is the new link to the code. I was unaware of the pastebin service.

    http://wordpress.pastebin.ca/345675

    Any help will be greatly appreciated.

    Thread Starter marcusto

    (@marcusto)

    OK, No Love here…got it.

    I figured it out if someone else runs into this. All my template files call the default sidebar.

    After the standard sidebar stuff I used if and elseif statements to call the wp include template path tag and then created separate sidebar files with only the content I needed for each page.

    Anywho…probably easy or obvious for most of you but for the rest of self-taught wordpress butcherers…i’ve got much love fo ya. STAY GEEK *Throws Fist in the Air*

    I changed the get sidebar function so that it accepts a parameter. I then feed it the name of the sidebar I want on a particular page. It defaults to the standard sidebar, so themes like the default that don’t pass in a parameter are still OK. Works great. I’ve put that in the suggestion list so hopefully it will be added in the next release and I can stop hacking the function every time.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Conditional Sidebars’ is closed to new replies.