Double featured images in archive

Community Forums Forums Design Tips and Tricks Double featured images in archive

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  cdils 1 year, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #46915

    Ben @ Advice Media
    Participant
    Post count: 158

    I’ve set the feature image to appear in a hook outside the content of a post. However, this has resulted in the featured image of a post appearing twice in the archives.

    Any idea how to resolve this?

    If you guys need to see a live example, I can sort it but I’m working on a localhost at the moment.


    #47078

    cdils
    Participant
    Post count: 421

    Hey there,

    Under theme settings do you have the box checked to show the featured image? That could be causing the duplicate if you’ve added in your own code to show a featured image. You can try toggling that button to fix it.

    Other option is to add a conditional statement along with your hook to only show the featured image on single posts or in archives.

    i.e.
    function show_featured_image() {
    if is_single() {
    // show featured image
    }
    }


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. :)

    I host a weekly Genesis-focused podcast called Genesis Office Hours. I tweet @cdils.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.