How do I make it so that certain sidebars only appear on specific pages or categories

Discussion in 'WordPress' started by JustBusiness, May 25, 2010.

  1. #1
    Hi,

    I put a content slider on my sidebar. Pretty simple, I just had to paste the code into sidebar.php.

    BUT, I only want it to show up for one category.

    What's the best way to have it so that you can have different sidebars for different pages and/or
    categories.

    I've read several ways that this is several ways to pull this off, but none have worked
    for me thus far.

    Any recommendations?

    Thanks in advance.

    JB
     
    JustBusiness, May 25, 2010 IP
  2. Michelle Waters

    Michelle Waters Member

    Messages:
    74
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #2
    Michelle Waters, May 25, 2010 IP
  3. JustBusiness

    JustBusiness Peon

    Messages:
    431
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Will that just work for text or code as well?
     
    JustBusiness, May 25, 2010 IP
  4. Michelle Waters

    Michelle Waters Member

    Messages:
    74
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #4
    I've used if/else statements for text and for code.
     
    Michelle Waters, May 25, 2010 IP
  5. bhuthecoder

    bhuthecoder Member

    Messages:
    245
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    43
    #5
    use this plugin
    http://wordpress.org/extend/plugins/widget-logic
    Code (markup):
    paste the code into a text widget and add to sidebar.php and add conditional tag is_category('category name') to that widget
     
    bhuthecoder, May 27, 2010 IP
  6. sherekhan2

    sherekhan2 Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If this doesn't work try hacking your sidebar.php file in your theme folder.
     
    sherekhan2, May 28, 2010 IP