WordPress.org

Ready to get started?Download WordPress

Forums

twenty ten header image based on category, unless featured image present (7 posts)

  1. csleh
    Member
    Posted 3 years ago #

    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.

    thanks!

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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 http://wordpress.pastebin.com/ and post the link to it here if your code is longer than a few lines)

  3. chartinael
    Member
    Posted 3 years ago #

    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?

  4. csleh
    Member
    Posted 3 years ago #

    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.
    http://wordpress.pastebin.com/bHdXps16

    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).

  5. chartinael
    Member
    Posted 3 years ago #

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

  6. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    @chartinael: Please stick to the one topic and don't highjack another poster's thread.
    http://wordpress.org/support/topic/twenty-one-and-custom-header-per-post-page?replies=5

  7. chartinael
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic