Display featured image Focus theme

Community Forums Forums Design Tips and Tricks Display featured image Focus theme

This topic is: not resolved

This topic contains 10 replies, has 3 voices, and was last updated by  braddalton 1 year, 6 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #35616

    SonofColl
    Participant
    Post count: 6

    My post pages either do have or will have their own featured image.

    However these images are not displayed in the posts themselves.

    Yes i know i could add an image to each page in the editing, but i thought the idea of featured images was that they would be the chosen image to get displayed at the top of the post.

    I need some help in getting these featured images to be displayed before the body text of each post, but after the header and meta data.

    I am using the Focus child theme, and am familiar with HTML and css but not php.

    Thanks

    Richard

    #35625

    braddalton
    Participant
    Post count: 10234

    Try this:

    You can easily change the hook location http://genesistutorials.com/visual-hook-guide/

    There’s many other ways you can also display featured images before your content and after your posts titles automatically.

    Code not displaying? Grab it on Github https://gist.github.com/braddalton


    #35739

    SonofColl
    Participant
    Post count: 6

    Thanks for the reply.

    I am not sure i have done it right though.

    I can get it to work in the post pages, however the hooks i have tried it on are the same ones used in the blog loop.

    Focus already displays images there so now i have two images for each post in the loop.

    I don’t really know php so i cant see which code in the Focus theme is adding these images. Meaning I can’t turn it off.

    Nor can can i see if there are any well placed hooks i can use in the blog posts, but don’t appear in the blog loop.

    I need a little more help

    Thanks

    Richard

    #35806

    braddalton
    Participant
    Post count: 10234

    You’ll need to add a 3rd parameter to the action for the priority or change the hook.

    I added this to the code above already.


    #35807

    braddalton
    Participant
    Post count: 10234
    This reply has been marked as private.
    #35898

    SonofColl
    Participant
    Post count: 6

    I tried the code above again, still the same problem of two images showing on the blog page.

    I looked at the page you linked to. No luck. The plugin offer worked but still two images. The Content Archive setting for featured images does not appear to do anything.

    I am now more confused than when i started.

    Looks like i have to do away with using featured images in the posts, try a different theme (if there is one), or just add the image into editor panel and remove all features images. I have a feeling though if i did that there would be no thumbnails on the blog page.

    #35903

    braddalton
    Participant
    Post count: 10234

    Thats what the PHP code does.

    It displays a featured image above the post title and on all archive pages.

    You’ll need to use this code or change the Genesis > Theme Settings > Content Archives > Display featured image


    #35923

    SonofColl
    Participant
    Post count: 6

    Genesis > Theme Settings > Content Archives > Display featured image. Ticking this box does not display the featured images in my posts. If it did, would not be on this forum asking about it.

    Your piece of code does do this, but the blog page will show two images for each post in the loop.

     

    #36916

    SonofColl
    Participant
    Post count: 6

    Is there any more advice that might help me with this?

    #37571

    Greg W
    Participant
    Post count: 3

    Brad thanks for the code. Works a treat! I used it to set a featured image on my pages with a few small mods and the right hook (and a bit of trial and error) to your code, combined with a custom image size. Cheers!

    #37574

    braddalton
    Participant
    Post count: 10234
Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.