Community Forums › Forums › Archived Forums › Design Tips and Tricks › Display featured image Focus theme
Tagged: Focus Featured Image
- This topic has 10 replies, 3 voices, and was last updated 11 years, 11 months ago by
Brad Dalton.
-
AuthorPosts
-
April 15, 2013 at 2:53 pm #35616
SonofColl
MemberMy 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
April 15, 2013 at 3:12 pm #35625Brad Dalton
ParticipantTry 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
April 16, 2013 at 8:03 am #35739SonofColl
MemberThanks 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
April 16, 2013 at 1:38 pm #35806Brad Dalton
ParticipantYou'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.
April 16, 2013 at 1:40 pm #35807Brad Dalton
ParticipantThis reply has been marked as private.April 17, 2013 at 12:02 am #35898SonofColl
MemberI 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.
April 17, 2013 at 1:26 am #35903Brad Dalton
ParticipantThats 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
April 17, 2013 at 6:09 am #35923SonofColl
MemberGenesis > 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.
April 22, 2013 at 11:16 am #36916SonofColl
MemberIs there any more advice that might help me with this?
April 25, 2013 at 4:22 am #37571Greg W
MemberBrad 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!
April 25, 2013 at 4:29 am #37574Brad Dalton
Participant -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.