• I am trying to figure out how to create custom category sidebars that can appear on individual post pages as well as category archive pages. Some posts may have two categories — one of which will always be the same ID, which will not need its own custom sidebar.

    So the logic is: If the current page is an individual post and (excluding y) the individual post has a category ID of x, then display sidebar-x.php. If the current page is a category archive, and the category ID is x, then display sidebar-x.

    Can anyone help me with this?

  • The topic ‘Category-Specific Sidebars’ is closed to new replies.