Community Forums › Forums › Archived Forums › Design Tips and Tricks › Category Blog Page – add featured image
Tagged: blog template, featured image
- This topic has 7 replies, 2 voices, and was last updated 11 years, 4 months ago by
2TechGirls.
-
AuthorPosts
-
July 21, 2014 at 1:29 pm #115240
2TechGirls
Member1. How can I add a featured image to pages using the blog template?
Hi, I've created 2 category blog pages for the main categories on the site following the instructions here - http://my.studiopress.com/tutorials/category-blog-page/. I've added a featured image on those two pages. The featured image only displays on the default template, not on the blog template.
2. How can I add a featured image to a category ? I've tried a few plugins with no luck.
Thanks,
http://2techgirls.com/atforum/news-updates/
KrisJuly 21, 2014 at 2:01 pm #115245Brad Dalton
ParticipantUse the Genesis > Theme Settings
Or add in the post image directly to the template.
add_action( 'genesis_entry_content', 'genesis_do_post_image' );
July 21, 2014 at 2:13 pm #1152472TechGirls
MemberNeither of those work. I had already changed the Genesis > Theme Settings without any luck. Adding the code
add_action( 'genesis_entry_content', 'genesis_do_post_image' );
to the function.php file does not update my page.I'm using the Beautiful Pro theme.
July 21, 2014 at 2:52 pm #115252Brad Dalton
ParticipantI suggested adding it directly to the template not the functions file.
Or add in the post image directly to the template.
July 21, 2014 at 7:23 pm #1152812TechGirls
MemberAh, sorry, missed that. We've made a change and it's working.
Thanks.
July 22, 2014 at 10:05 am #1153892TechGirls
Membercorrection this was not resolved. My solution added the featured image to every post on the blog page. The @braddalton there is not a blog template in this child theme. The blog template functionality is handled in the loops.php file that resides in the Genesis\lib\structure. I attempted to over ride this with my own plugin duplicating all the functionality of this loop, but adding the featured image of the page. It did not work.
Note: for some reason I cannot trap the page id of the blog page that uses the blog_page.php template.
Note: the function is_page(); returns false.We are still open to ideas. It should not be this difficult to just add a featured image to a page.
July 22, 2014 at 10:33 am #115402Brad Dalton
ParticipantUnderstand. The conditional tag for the blog page is tricky. You need to find the output in the source code so it could be.
if ( is_page_template('blog_page.php') )or it might be:
if ( is_page_template('blog-page.php') )Another option i think you should consider is using this code to create your own custom category templatesrather than the category blog page templates.
July 22, 2014 at 10:44 am #1154062TechGirls
Memberis_page_template('blog_page.php')comes up true ingenesis_do_loop(), but comes up false after this process completes.
i'll need to create another custom archive page as you suggested. -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.