Category Blog Page – add featured image

Community Forums Forums Design Tips and Tricks Category Blog Page – add featured image

This topic is: not resolved

This topic contains 7 replies, has 2 voices, and was last updated by  2TechGirls 1 month, 3 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #115240

    2TechGirls
    Participant
    Post count: 12

    1. 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,
    Kris

    http://2techgirls.com/atforum/news-updates/
    #115245

    braddalton
    Participant
    Post count: 9722

    Use the Genesis > Theme Settings

    Or add in the post image directly to the template.

    add_action( 'genesis_entry_content', 'genesis_do_post_image' );
    

    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #115247

    2TechGirls
    Participant
    Post count: 12

    Neither 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.

    #115252

    braddalton
    Participant
    Post count: 9722

    I suggested adding it directly to the template not the functions file.

    Or add in the post image directly to the template.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #115281

    2TechGirls
    Participant
    Post count: 12

    Ah, sorry, missed that. We’ve made a change and it’s working.

    Thanks.

    #115389

    2TechGirls
    Participant
    Post count: 12

    correction 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.

    • This reply was modified 1 month, 3 weeks ago by  2TechGirls.
    • This reply was modified 1 month, 3 weeks ago by  2TechGirls.
    #115402

    braddalton
    Participant
    Post count: 9722

    Understand. 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.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #115406

    2TechGirls
    Participant
    Post count: 12

    is_page_template('blog_page.php') comes up true in genesis_do_loop(), but comes up false after this process completes.
    i’ll need to create another custom archive page as you suggested.

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

You must be logged in to reply to this topic.