• 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

Post Info & Excerpts on Teasers & Featured Posts

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 › Post Info & Excerpts on Teasers & Featured Posts

This topic is: resolved

Tagged: .post-info, featured posts, Teaser

  • This topic has 12 replies, 2 voices, and was last updated 12 years, 1 month ago by handsonaswegrow.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • April 8, 2013 at 6:57 am #33955
    handsonaswegrow
    Member

    I would like the post_info to be remove from the homepage teasers (date would actually be great to keep there) and then on the posts to only have the post_author - I have created the code:

    /** Remove the post meta function */
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );

    /** Customize the post info function */
    add_filter( 'genesis_post_info', 'post_info_filter' );
    function post_info_filter($post_info) {
    if ( !is_single () ) {
    $post_info = 'By [post_author_posts_link] [post_edit]'
    return $post_info;
    }}
    add_filter( 'genesis_post_info', 'post_home_info_filter' );
    function post_home_info_filter($post__home_info) {
    if ( !is_home () ) {
    $post_home_info = '[post_date] [post_edit]';
    return $post_home_info;
    }}
    But it's not quite working for me. It takes away the post_info on the homepage altogether and just the date shows on the posts. Not quite what I was looking for, but I'm getting closer.
    Another question I have... I'd like to remove the excerpts on teasers only (and keep the excerpt on the 1 feature post on the homepage). I have found the code to change the length of teasers and I can remove them by using 0 - but I lose the excerpt on the feature too.
    I think that's all I have for now. And please let me know if I'm overstepping our relationship by asking you these. I can't find anything in searching.
    I'm using the Genesis-Sample child theme. My site is http://handsonaswegrow.com

    April 9, 2013 at 12:31 pm #34313
    Brad Dalton
    Participant

    Could you remove the PHP code so the post info displays. Its easier to use CSS code for this.


    Tutorials for StudioPress Themes.

    April 9, 2013 at 12:53 pm #34318
    handsonaswegrow
    Member

    Brad - I sure can. How do I adjust it with CSS?

    April 9, 2013 at 1:14 pm #34327
    Brad Dalton
    Participant

    Install Firebug and target the post-info date and author classes using the body class for the home page and posts from the source code.

    http://www.studiopress.community/topic/customizing-post-info/#post-34289


    Tutorials for StudioPress Themes.

    April 9, 2013 at 1:18 pm #34328
    handsonaswegrow
    Member

    Brad - but how can I do that to apply to home differently than the posts themselves?

    April 9, 2013 at 1:36 pm #34330
    Brad Dalton
    Participant

    body class

    its hard to test on your site because you have removed most of the post info


    Tutorials for StudioPress Themes.

    April 9, 2013 at 2:58 pm #34350
    handsonaswegrow
    Member

    okay, I've removed it from my php file and put .post-info and .post-meta to display:none in my css, but I'd like some elements to show on posts (post-meta) and just the date to show on the home page (and archives) How can I tell that the difference with css?

    April 9, 2013 at 3:53 pm #34370
    Brad Dalton
    Participant

    Can't because they're not displaying so i can't inspect them using Firebug.

    You need to test this using Firebug first before making the changes in your child themes files.


    Tutorials for StudioPress Themes.

    April 10, 2013 at 2:22 pm #34615
    handsonaswegrow
    Member

    okay, I've removed the display:none - thought i hate how this looks in the meantime, I hope we can figure this out quickly.

    April 10, 2013 at 2:49 pm #34621
    Brad Dalton
    Participant

    You'll need to install Firebug and find the different classes for each post info class you want to hide:

    .home .post-comments {
    display:none;
    }
    
    .single-post .post-comments {
    display:none;
    }
    

    Tutorials for StudioPress Themes.

    April 10, 2013 at 3:14 pm #34623
    handsonaswegrow
    Member

    Thank you, I figured it out. Could never find .home and .single-post elements when using Firebug, so I just tried it and that worked. Thank you.

     

    CSS I added to remove post info for comments (from both home and posts), remove date on single posts and remove post-meta from home:

     
    .home .post-comments {
    display: none;
    }

    .home .post-meta {
    display: none;
    }

    .single-post .post-comments {
    display: none;
    }

    .single-post .post-info .date {
    display: none;
    }

    April 10, 2013 at 3:15 pm #34624
    handsonaswegrow
    Member

    Brad - I guess I snuck another question in here too - is there a way to remove excerpts from teasers (and not features)? on the homepage and archives?

    April 10, 2013 at 3:36 pm #34633
    handsonaswegrow
    Member

    And I figured that out with CSS too - for mine it was:

     

    .one-half .entry-content {
        display: none;
    }

  • Author
    Posts
Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Post Info & Excerpts on Teasers & Featured Posts’ is closed to new 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