WordPress.org

Ready to get started?Download WordPress

Forums

Different header graphic for each category? (5 posts)

  1. JHouse
    Member
    Posted 4 years ago #

    Hi,

    How would one assign a different header graphic for each category?

    I've successfully created numerous different category pages (category-1.php, category-2.php, etc.) all with different layouts, now I just need to customize the header graphic. I'm using this plugin "Dynamic Headers by Nicasio Design," but from what I can tell, it won't allow you to control the header images for Categories, just Pages and the main part of the blog.

    Any ideas?

    Thanks in advance.

  2. dcannon1
    Member
    Posted 4 years ago #

    You're correct that our Dynamic Headers plugin doesn't yet allow for category headers. This is going to be future functionality, although we haven't set a formal launch date for the functionality.

  3. JHouse
    Member
    Posted 4 years ago #

    Definitely looking forward to the launch. It's a great plugin, having it so you can change the category headers would make it ultra great.

    On a somewhat related note, this guy has info on how to change the category headers, however, he didn't provide the example code, just a snippet. http://www.ruhanirabin.com/different-headers-in-different-categories-and-pages-wordpress/

    Unfortunately, I'm not the best at writing php, so I haven't had any luck with the code provided via that link. I'm trying to find something I can just copy and paste, then change the values (i.e. change category-1.php to category-15.php). If someone could help out here, that would be awesome.

    Thanks.

  4. JHouse
    Member
    Posted 4 years ago #

    I found another way to do this, however, it's definitely not the most efficient. I wish I knew how to program better 'cause this is definitely the long way...and that's having each category call a different header,. Since I have about 16 different categories, there'll be 16 different headers...all pretty much having the same code. Yes, seriously redundant code. Yikes. Anybody want to chime in a give me a simpler, way more efficient route?

    Thanks.

  5. JHouse
    Member
    Posted 4 years ago #

    Anybody have a more efficient way to creating different headers for each category? I wish I knew how to write conditional statements 'cause that would do the trick.

Topic Closed

This topic has been closed to new replies.

About this Topic