Support » Themes and Templates » twenty ten header image based on category, unless featured image present

  • I have been unable to edit the twenty-ten header code to show images based on category, so I reverted to my old if/else code. But it would be great to override the category default if a particular post/page has a featured image.

    Right now twenty-ten shows one default image unless overridden by a featured image on a page/post.


Viewing 6 replies - 1 through 6 (of 6 total)
  • Michael


    Forum Moderator

    if would help, if you could post your ‘if/else’ code as a starting point for suggestions, if and how this could be overwritten by the featured image.

    (and please use the and post the link to it here if your code is longer than a few lines)

    csleh, how do you get the featured image to work? somehow my images only get posted in the content area? What the heck am I doing wrong?

    chartinael, I didn’t get it to work yet because I had to take that code out. You might want to start a new thread because that does sound unusual. Also, make sure the feature image is uploaded on the right side of the post/page, using the featured image link.

    alchymyth, thanks!

    the code is shortened, and posted here.

    The first bit is some if/else I’m using now, the second is from twenty ten header.php I’d like to modify to have more than one default image (based on category/section).

    hey csleh, i already started separate thread … tried the upload right thing. Nope, doesn’t work. I think I need screenshot instructions.



    Forum Moderator

    @chartinael: Please stick to the one topic and don’t highjack another poster’s thread.

    csleh, got the featured image part to work now for post and pages. Will also try to hack to get it to work with categories.

    I’d like to be able to assign headers directly to the category in the edit section. Don’t know how to though. So, I will keep you uptodate with my basic efforts. I’d appreciate your work as well.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘twenty ten header image based on category, unless featured image present’ is closed to new replies.