Remove Post Meta from Home Page

Community Forums Forums General Discussion Remove Post Meta from Home Page

This topic is: not resolved

This topic contains 13 replies, has 7 voices, and was last updated by  anitac 1 year, 4 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #11643

    ezines
    Participant
    Post count: 74

    How can I remove the post meta on the home page only?

    Using Pretty Pictures theme.

    #11717

    itsonlybarney
    Participant
    Post count: 15

    I’m not familiar with Pretty Pictures, but I think if you add this code to home.php then it will be removed.


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

    #11741

    ezines
    Participant
    Post count: 74

    Appreciate the input but that’s not it.

    Your snippet “should” remove post meta across the whole site, but for some reason it doesn’t work on Pretty Pictures.  Not sure why it doesn’t work on this theme.

    I want to remove post meta from the homepage only.

    #11746

    itsonlybarney
    Participant
    Post count: 15

    I mentioned to add it to home.php. Like I said I’m not familiar with Pretty Pictures, and I don’t have access to the them.

    Also, maybe try adding the plugin – http://wordpress.org/extend/plugins/genesis-visual-hook-guide/ – to see which hook the post meta is added to.

    #12197

    ezines
    Participant
    Post count: 74

    Thanks Barney.

    No home.php in this theme

    Does anyone have a clue?

    #12634

    FireSamurai
    Participant
    Post count: 42

    Ezines,

    You’ll want to add a function with a conditional statement in your functions.php file, like this:

    /** Remove the post meta function on homepage */
    function my_remove_post_meta() {
    if ( is_home() || is_front_page() ) {
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
    }}


    My Websites: TheCookingDish.com | ChrisMower.com
    Connect with me: Facebook | Pinterest | Twitter | Google +

    #12875

    ezines
    Participant
    Post count: 74

    Thanks FireSamurai, but that did not work.

    None of the remove post meta functions seem work on this theme.

    This is from the SP code snippets page and it also does not work. Meta remains across the theme:

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

    I’ve also tried a variety of things all over the Simple Hooks plugin.

    I sincerely thank to community for offering assistance.

    It’s getting to be WAY PAST TIME for some help from Studiopress support.  Is anyone out there?

    #12877

    Susan
    Moderator
    Post count: 7991

    It’s getting to be WAY PAST TIME for some help from Studiopress support.  Is anyone out there?

    This support forum is for users such as yourself  to assist other users. “Official” StudioPress support is for getting the theme to look like the demo, and for technical assistance, and is done by submitting a help ticket. Anything beyond that is deemed “customization” and is handled here on the forum.

    Edited to add – I’m a StudioPress user like you, not a StudioPress employee.


    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #12880

    Susan
    Moderator
    Post count: 7991

    Try this:


    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #12905

    ezines
    Participant
    Post count: 74

    FireSamurai – Thanks again!

    I kept playing with your code. It was very close, just missing a couple of exclamation marks:

    function my_remove_post_meta() {
    if ( !is_home() || !is_front_page() ) {
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
    }}

    #12913

    Susan
    Moderator
    Post count: 7991

    @ezines – were you able to utilize the gist to solve your problem?


    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #15732

    cdils
    Participant
    Post count: 420

    Hey there,

    Just seeing this thread and wanted to post a complete code snippet to remove the post meta on the home page only of a site. Thanks to @Susan for the starter gist and @ezines for the pointing out the correct action:

    add_action( ‘genesis_before’, ‘child_conditional_actions’ );
    function child_conditional_actions() {

    if( is_home() || is_front_page() ) { //if page is home page or front page
    remove_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );
    }

    }


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. :)

    I tweet @cdils.

    #23317

    braddalton
    Participant
    Post count: 8873

    Couldn’t get that code working. Not sure why?


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #23971

    anitac
    Participant
    Post count: 7028

    Brad, if you didn’t change the apostrophes – try copying this. I fixed them.

    [php]
    add_action( ‘genesis_before’, ‘child_conditional_actions’ );
    function child_conditional_actions() {

    if( is_home() || is_front_page() ) { //if page is home page or front page
    remove_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );
    }
    }
    [/php]


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

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

You must be logged in to reply to this topic.