• Resolved madisunanne

    (@madisunanne)


    Hello,

    When you view a single-post on my page in certain categories, the header image disappears. I commented out of an echo code in the header.php to stop the header from becoming the actual image in the post, but now it took my header away.

    My blog is: https://www.aninchofhope.com

    Can anyone help?

    Thank you,
    madisunanne.
    <3

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

    (@highfxmedia)

    madisunanne:

    I looked at your site and I’m not sure what you did or why. The header image will not be the image in the post so your statement is confusing. What happens if you undo your “comment out?”

    Thread Starter madisunanne

    (@madisunanne)

    @kurt,

    I apologize,…
    My statement is confusing b/c I should have said it the other way around.
    I commented out to stop the actual image in the post from becoming the header.

    I just took out the “comment out,” & then you will see what I mean.
    It only happens on these two categories:
    GRAPHIC/DESIGN
    CAMERA

    I have no idea why…
    Can you help?

    Kurt

    (@highfxmedia)

    madisunanne:

    OK. I set my test site to use the 2011 theme. I see the code in the header.

    The code says this:

    If it’s a single post and the post has a thumbnail assigned to it, get the thumbnail image and display it in the header. Otherwise, display the default header image.

    The fact that the post image is displaying on specific posts has nothing to do with categories.

    The post thumbnail is set when you set the Featured Image in the post edit screen.

    Look at a post where the post image is in the header and then look at a post where the default image is displayed. I suspect that you inserted the post image into the post on posts where the default image shows in the header. You should see that the Featured Image has not been set.

    Go back to the posts where the post image is in the header. Remove the Featured Image. Then insert the image into the post content where you want it to appear – at the top I would guess.

    Thread Starter madisunanne

    (@madisunanne)

    @kirk,

    Thank you for your reply.
    I attempted to remove the featured image from one of the links where it was taking over the header in single-post mode, but to no avail…

    If I hit update/publish, it still remains the same.

    I have no idea why…
    =(

    Thread Starter madisunanne

    (@madisunanne)

    @kirk,

    I finally found an answer in the forum which worked!
    It was quite a big edit, but for anyone else struggling w/this same issue,

    here it is:
    https://pastebin.com/umRMsJuT

    Replace the corresponding header.php section in your child theme w/the edit from the link above, & you should be good to go!

    Thanks again,
    madisunanne.
    <3

    Kurt

    (@highfxmedia)

    madisunanne:

    I’m sure it works. However, it’s totally unnecessary. All you had to do was remove the Featured Image in your posts and insert the image into the content.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Header Help on Single Post Pages in Twenty Eleven Theme’ is closed to new replies.