• 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

Help Removing 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 › Help Removing Post Info

This topic is: resolved

Tagged: action, custom, filters, hooks, info, post, remove, type

  • This topic has 3 replies, 2 voices, and was last updated 10 years, 9 months ago by Christoph.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 24, 2015 at 6:49 pm #149072
    Porter
    Participant

    I'm having trouble removing my post info on a custom post type page. I moved the post info to the bottom of the post with this:

    //* Move the post info to the bottom of the page.
    remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    add_action( 'genesis_after_entry_content', 'genesis_post_info');

    I then found this code to remove the post info from a specific (or array) of custom post types:

    //Remove post meta information from custom post types that don't need it.
    add_filter ('genesis_after_entry_content', 'tx_remove_post_info');
    
    function tx_remove_post_info() {
    	if (is_singular(array( 'venues', 'CPTNAME2', 'CPTNAME3' ))) {
    		echo("removing this");
    		remove_action( 'genesis_after_entry_content', 'genesis_post_info', 12 );
    		}
    }

    The echo is being read, so that bit works, but the post info isn't being removed. I assume I need to use "genesis_after_entry_content", as that's where I moved the post info to, but I'm not sure. One small note, the movement piece of code is in functions.php, while the removal for the custom post type is in a site specific plugin - I'm not sure if that's conflicting somehow (which is read first, etc). Any ideas?

    Here's the page I'm trying to remove it from (bottom right) - http://towerofgreed.com/venues/akes-place/


    Buy me a beer? | Try DigitalOcean VPS Hosting

    April 24, 2015 at 9:35 pm #149081
    Christoph
    Member

    Hi,

    if you are using a plugin, wrap the remove action in a function:
    http://www.christophherr.com/how-to-use-remove_actions-in-a-plugin/


    https://www.christophherr.com | Genesis Customizations | Buy me a coffee

    April 24, 2015 at 11:08 pm #149095
    Porter
    Participant

    I figured it out! I hadn't really paid any attention to the priority value (3rd parameter), and since I was removing, adding, and then conditionally removing, they weren't firing in the proper order. I was essentially trying to remove something that wasn't there yet, which is why the echo was above the post info. I set a manual value of 18 for the add and second remove, and that worked. I'll read up a bit more to fully grasp the priority system, but that was it 🙂


    Buy me a beer? | Try DigitalOcean VPS Hosting

    April 24, 2015 at 11:33 pm #149100
    Christoph
    Member

    Glad you figured it out. I was just going to suggest to play with the priorities 🙂


    https://www.christophherr.com | Genesis Customizations | Buy me a coffee

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Help Removing Post Info’ 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

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