• 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

Modern Portfolio Pro- remove post info

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 › Modern Portfolio Pro- remove post info

This topic is: resolved
  • This topic has 5 replies, 2 voices, and was last updated 9 years, 8 months ago by Porter.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • November 2, 2015 at 11:41 am #169897
    bburro
    Member

    I am following these instructions https://my.studiopress.com/snippets/post-info/ to remove the post info from my site.

    I pasted

    //* Remove the post info function
    remove_action( 'genesis_before_post_content', 'genesis_post_info' );

    at the end of my functions.php file... but it did nothing.

    I know I can use the Simple Edits Plugin, but I want to do it this way-- or at least understand why what I'm doing isn't working 😉

    Would future updates overwrite my functions.php-- and if so, I just need to make sure I copy my edits and paste them back after updating or...?

    Thanks!

    November 2, 2015 at 12:14 pm #169901
    Porter
    Participant

    Link us to your site so we can see what's gong on.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    November 3, 2015 at 10:53 am #170009
    bburro
    Member

    I am building my site on localhost, so link is not available at this time...

    Thanks!

    November 3, 2015 at 11:10 am #170015
    Porter
    Participant

    Themes themselves generally don't get updates, just Genesis, so your code in functions.php is safe.

    The code you added should work, assuming the info is currently displaying "before post content" and your hook is right, which I'm unfamiliar with the default location of whatever theme you're using. I don't know if your theme / site changes the location of where that is at any point, but that would be my guess as to what isn't working.

    Try replacing that with:

    remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );

    As that's where my info is displayed by default (genesis_entry_header, not genesis_before_content).


    Buy me a beer? | Try DigitalOcean VPS Hosting

    November 3, 2015 at 12:23 pm #170040
    bburro
    Member

    @Porter--

    Boom. You tha man!

    Learning hooks- so that was the problem-- I was "hooked" into the wrong location, right?

    So it's

    what_to_do( 'heres_my_hook', 'heres_the_part_of_the_hook_I_want_to_modify', no idea);

    I will go back and review their tutorial. This is essential!!

    Thanks again for your help!

    November 3, 2015 at 12:36 pm #170044
    Porter
    Participant

    Exactly - you were trying to remove post info from an area where it currently didn't exist! That doesn't throw an error (Genesis handles that silently), but it simply doesn't do anything if the item isn't there.

    It's basically add_action or remove_action, hook_name, part you're modifying, priority. Priority (the number value) is where in the "stack" this action happens. This lets you determine if one hook happens before another, regardless of where in the code it is. A priority of 1 will happen first, where as 99 will happen alter - I believe the default is 12. This isn't too important, but a good example is if you remove something from one place, and add it to another place - you want to ensure the remove happens first, and the add happens after, so you can assign a priority of 11 to the remove, and 12 to the new add.

    There's also filters, which allow you to change elements of the area you specify, like the footer.

    You can also change the part of the hook you want to effect, to a custom function, and do anything you want, like so:

    add_action('genesis_after_entry_content', 'anib_remove_post_info');
    
    function anib_remove_post_info() {
    	if (is_singular(array( 'venues' ))) {
    		remove_action( 'genesis_after_entry_content', 'genesis_post_info', 18);
    	}
    }

    That COULD have just been:

    remove_action( 'genesis_after_entry_content', 'genesis_post_info', 18);

    but calling the custom function 'anib_remove_post_info' allowed me to specify that I only wanted the remove action to occur if I was on a page of the "venues" custom post type. If I did if(is_home()) the action would only happen on the front page, etc - it simply gives you further control.

    Definitely read up on them / play around, it's crucial to a proper understanding of Genesis, and makes things REALLY easy once you get it.


    Buy me a beer? | Try DigitalOcean VPS Hosting

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