WordPress.org

Ready to get started?Download WordPress

Forums

Sidebars and Widgets (2 posts)

  1. ProfBob
    Member
    Posted 5 years ago #

    Hello,
    I'm using WP2.7 (not an option for version) and would like to know if it is possible to have different content in the Sidebar for each different page in my WP site. I have not found a way to put different widgets in the sidebar based on the page being displayed. Could anyone assist with this?

  2. You could set up your sidebar.php to use Conditional Tags. So if it's the front page (is_front_page) you see one, but if it's post ID 1007 it'll do something else.

    In THEORY, use something like is_single('the_ID()'), which should spit back is_single('17') or whatever the ID is, and then you could have sidebar-17.php and just call that. Given how many posts there may be, I'd use categories instead of posts, but play around :)

Topic Closed

This topic has been closed to new replies.

About this Topic