• 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

Excerpts on Custom Blog Page/Full Post on Home Page

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 › Excerpts on Custom Blog Page/Full Post on Home Page

This topic is: not resolved

Tagged: creating blocks on pages, show whole sticky post, sticky post

  • This topic has 9 replies, 4 voices, and was last updated 12 years, 7 months ago by CarrieBYogini.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • December 26, 2012 at 5:15 pm #7585
    kilerb
    Member

    Hi, I've went through a few posts on the old forum regarding this, and none of the solutions seem to be for my situation.  Here's what I have.

    A main page (Splash page, which is a static page with the blog template activated and a query of cat=1) so it only shows that category.  Works fine.  I'd like to keep it showing the entire post.

    Then I have a 2nd page called "Blog" and it's basically just a 2nd category only.  Use the menu to add that blog page with just the specific category.  I would like this one to only show excerpts.  Not the entire post.  I've tried adding the codes suggested in the old forums, but I think I've made this differently than they did because they didn't work.  In this scenario, how could I make this work?

    Thanks!
    B

    December 27, 2012 at 5:52 pm #7797
    Jen Baumann
    Participant

    Can you provide a link to your site and in particular, which pages you want which scenario to apply to? Thanks.

    December 27, 2012 at 5:53 pm #7798
    kilerb
    Member

    http://lorasomoza.com/ ...  Want full posts on the main page since it's a podcast and want the play buttons to show.

    Just want excerpts under the blog tab...   http://lorasomoza.com/?cat=3

    Thanks!

    December 27, 2012 at 6:28 pm #7804
    Jen Baumann
    Participant

    Ok, so there's a couple of things to address here.

    When you set the homepage to use the blog page template, that normally causes problems with pagination once you have enough posts to see that. So, I recommend against that. Instead, you can have a home.php that should solve all problems.

    Create a home.php and add this content:

    <?php
    /** Removes everything form post content **/
    remove_all_actions( 'genesis_post_content' );
    
    /**Add full content**/
    add_action( 'genesis_post_content', 'the_content' );
    /**use only category 1**/
    function child_before_loop () {
        global $query_string;		
        query_posts ($query_string . '&cat=1');
    }
    add_action('genesis_before_loop', 'child_before_loop');
    
    genesis();

    For the Podcast category, you'll probably want a function like this as well in functions.php

    add_action( 'genesis_before', 'child_conditional_actions' );
    function child_conditional_actions() {
        if( is_category( 1 ) ) {
           remove_all_actions( 'genesis_post_content' );
           add_action( 'genesis_post_content', 'the_content' );
        }
    }

    Then, make sure you set your Settings > Reading to display your latest posts and set the Theme Options to display either Excerpts or a Content Limit.

    Let me know how that works.

    December 30, 2012 at 8:32 pm #8504
    kilerb
    Member

    Hi there!  Just got back and am trying this now.

    I added the codes you suggested to home.php and functions.php and it still seems to show either excerpts or full posts on both pages, depending what's selected in the Genesis area.

    Also, after trying that, I figured I had to change the "reading" area in settings to "show latest posts"  ...  After doing that, I got this error below...  (I replaced the site with mydomain so it's not on here a bunch of times.)

    Parse error: syntax error, unexpected '<' in /nfs/c05/h04/mnt/160582/domains/mydomain.com/html/wp-content/themes/streamline/home.php on line 43

    Probably doing something dumb, but not sure what.  I left the code where you told me to put it.  Did I do something wrong?

    Thanks!

    B

    January 2, 2013 at 12:05 pm #8976
    kilerb
    Member

    Not one to bump things, but I figured this might have gotten lost in the mix during the holidays!  🙂  Happy New Year...  Would love to get this going today if you're around.  I might have done something wrong, but I'm pretty sure I copy and pasted these snippets correctly.

    Thanks!

    January 3, 2013 at 9:32 am #9181
    Jen Baumann
    Participant

    If you already had <?php at the top of home.php, then adding another will cause that. This should be a new home.php, not one that came with the theme.

    January 3, 2013 at 11:50 am #9202
    kilerb
    Member

    Thanks 🙂

    January 4, 2013 at 7:42 pm #9649
    Cathy @ WPBarista
    Member

    I'm using this code, Jen, and my read more filters aren't being executed... I've added the filter to a custom function like this in the home.php file:

    
    /**add some functions to run before loop**/
    add_action( 'genesis_before','dswp_run_before');
     function dswp_run_before() {
    
     /** Modify the Genesis content limit read more link */
     add_filter( 'get_the_content_more_link', 'bargainstobounty_read_more_link' );
     function bargainstobounty_read_more_link() {
     return '... <a class="more-link" href="' . get_permalink() . '">Read More &raquo;</a>';
     }
     /** Modify the WordPress read more link */
     add_filter( 'the_content_more_link', 'custom_read_more_link' );
     function custom_read_more_link() {
     return '<a class="more-link" href="' . get_permalink() . '">Read More &raquo;</a>';
     }
    }

    They're still not showing though - no read-more links at all!


    Visit WP Barista to download 52 Quick Edits You Can do Today to Get More Clicks / Views / Sales. I also do paid support (starting at $75) and fully custom Genesis Child Themes.
    March 26, 2013 at 6:17 pm #31432
    CarrieBYogini
    Member

    I don't ? think this "topic" covers my issue.  However maybe someone may have the answer!!

    My "sticky" post, I want the whole POST to show but only on the sticky not on the other blog posts.  Am I to input a code just on that post itself and if so, what would the code be?

    http://carriebcottrill.com

    The post that says "Namaste Creative Yoga Spirits" is the one I want to show the whole post; not to be changed unless I change it!!

    Anyone???

    Also I'm trying to make blocks on my "shoppe" page that looks like http://hibiscusmooncrystalacademy.com/shop/ !!

    Can you send me to a post that describes instructions for this or provide here?    I've been working at this soooo long and I just need to figure out these 2 things and I'll be the happiest yogini!!

    Thanks sooo much!

    Carrie B!

     

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 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

© 2025 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