• 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

Remove Post Meta from home page with excerpts

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 › General Discussion › Remove Post Meta from home page with excerpts

This topic is: not resolved

Tagged: blissful, home page, post meta, remove

  • This topic has 7 replies, 3 voices, and was last updated 9 years, 11 months ago by Brad Dalton.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • February 10, 2013 at 9:45 pm #19513
    niftycreations
    Member

    I am trying to add a jpg of my disclosure under the post meta on the posts only. When I use simple hooks I can achieve that, however it also shows up on my homepage under my post meta. Is there anyway to remove the post meta from my home page? Or, is there something different you would suggest using to have it appear on my posts only? I am using the Blissful theme.

    < a href="http://amomhavingfun.com">A Mom Having Fun</a>

    Thank you!!

    February 10, 2013 at 9:57 pm #19519
    Davinder Singh Kainth
    Member

    Use following in functions.php

    // remove post meta on homepage

    remove_action('genesis_after_post_content', 'genesis_post_meta');

    add_action('template_redirect', 'child_conditional_actions');

    function child_conditional_actions() {

    if( is_single() ) {

    add_action('genesis_after_post_content', 'genesis_post_meta');

    }}


    Sunshine PRO genesis theme
    Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes

    February 10, 2013 at 10:17 pm #19522
    niftycreations
    Member

    Hi @idavinder,

    I added that code but the post meta is still showing on the homepage. Any other suggestions?

    Thank you!

    February 10, 2013 at 10:19 pm #19523
    niftycreations
    Member

    Ahhhh, I just saw the home.php:

    <?php
    /** Add home top widget area */
    add_action( 'genesis_before_loop', 'blissful_home_top' );
    function blissful_home_top() {
    dynamic_sidebar( 'home-top' );
    }

    genesis();

    I added this code:

    /** Remove the post meta function for front page only */
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );

    Which did remove the post meta from the home page, but my jpg is still showing on the home page. I want that to show up only on the post pages.

    Do you have any other suggestions?

    February 10, 2013 at 11:32 pm #19534
    Brad Dalton
    Participant

    You can add a widget area to the genesis_after_content area and use the is_single() conditional tag or the Widget Logic plugin so it doesn't display on any archive pages including the homepage.

    Code: http://pastebin.com/u/braddalton

    Another way is to hide the image on the homepage using CSS code:

    Can you post a link to your site please.


    Get Help – Book Consultation.

    February 11, 2013 at 3:36 pm #19696
    niftycreations
    Member

    Hi @braddalton

    The link to my website is: <a href="http://amomhavingfun.com">A Mom Having fun</a>

    Thank you!

    February 11, 2013 at 4:34 pm #19713
    niftycreations
    Member

    Yay, I got it to work! Thank you @braddalton, your suggestions definitely helped!

    I put:

    <?php if (is_single()) { ?>
    <img border="0" src="http://amomhavingfun.com/wp-content/uploads/2013/02/disclosure1.jpg" /></a>
    <?php } ?>

    Under the genesis_post_content Hook

    Thank you again! So excited!

    February 12, 2013 at 2:26 am #19782
    Brad Dalton
    Participant

    You could also add a widget to that hook easily


    Get Help – Book Consultation.

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘General Discussion’ 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

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