• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Show full posts for specific category?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Show full posts for specific category?

This topic is: resolved
  • This topic has 7 replies, 3 voices, and was last updated 11 years, 1 month ago by Tonya.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • March 12, 2015 at 2:17 am #144130
    Birming
    Member

    I'm trying to have one category to show full posts, just as they would look on a single page.

    This is where I am right now, but it displays as "Show Content", ignoring line breaks:

    add_action('genesis_post_content', 'add_genesis_post_content');
    function add_genesis_post_content() {
        if ( is_category( '506' ) )
            remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
            remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
            add_action( 'genesis_entry_content', 'the_content' );
    }

    How should the code look for the posts to display fully?

    Thanks in advance!


    Robert Birming
    Mittpunkt

    March 12, 2015 at 4:32 am #144141
    Tonya
    Member

    Hello Robert,

    You can achieve this fairly easily. If you look in genesis/lib/structure/post.php and go to about line 303 you find the genesis_do_post_content() function. This function handles how the content is rendered (displayed out to the browser). If all you want to do is show the full posts on the Category 506 archive page, then here is a snippet to help you out:

    add_action( 'genesis_entry_content', 'tonya_do_post_content' );
    add_action( 'genesis_post_content', 'tonya_do_post_content' );
    /**
     * Show the full content vs. excerpt for specific category
     *
     * @since 1.0.0
     * 
     * @uses genesis_do_post_content()
     * 
     * @return void
     */
    function tonya_do_post_content() {
    	
    	//* If this is category 506, then override the settings & just render
    	//* out the full content.
    	if ( is_category( 506 ) ) {
    
    		the_content( __( '[Read more...]', 'genesis' ) );
    
    	} 
    	//* Otherwise, call the standard Genesis function & let it handle the output
    	else {
    
    		genesis_do_post_content();
    
    	}
    }

    So basically, if it is the right category you are targeting, then call the_content() which outputs the full post; else call Genesis and let it handle it.

    Cheers,
    Tonya


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

    March 12, 2015 at 8:32 am #144166
    Brad Dalton
    Participant

    Very good Tonya.


    Tutorials for StudioPress Themes.

    March 12, 2015 at 12:06 pm #144212
    Tonya
    Member

    Thanks, Brad!


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

    March 12, 2015 at 12:44 pm #144214
    Birming
    Member

    Thank you very much, Tonya, much appreciated!

    One thing, though. Now the other categories display the preview content twice, no matter if I chose "Display post content" or "Display post excerpts" in the Genesis theme settings.

    Any idea how to fix this? Thanks in advance!

    Cheers,
    Robert


    Robert Birming
    Mittpunkt

    March 12, 2015 at 1:33 pm #144221
    Tonya
    Member

    Hey Robert,

    And it would because I forgot to tell you to do add this too:

    remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
    remove_action( 'genesis_post_content', 'genesis_do_post_content' );

    Sorry about that.

    So you are removing the genesis_do_post_content() function from the hook and replacing it with tonya_do_post_content() or whatever you call it in your site.

    Cheers,
    Tonya


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

    March 12, 2015 at 2:13 pm #144225
    Birming
    Member

    Thank you so very much for that, Tonya! It worked great 🙂

    Cheers,
    Robert


    Robert Birming
    Mittpunkt

    March 12, 2015 at 2:15 pm #144227
    Tonya
    Member

    You are very welcome, Robert. Please do me a favor and mark this topic as "Resolved", as it helps us navigate open issues.

    Enjoy the rest of your week!

    Cheers,
    Tonya


    Software & Electrical Engineer and Programming Teacher · I’m on a mission to help developers be more awesome.
    Find Me: KnowTheCode.io | @hellofromTonya | Profitable WordPress Developer Bootcamp

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble