• 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 in custom post type

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 › remove post meta in custom post type

This topic is: not resolved

Tagged: remove post meta

  • This topic has 5 replies, 2 voices, and was last updated 12 years, 3 months ago by pixelhappy.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • February 11, 2014 at 6:05 am #89767
    pixelhappy
    Member

    Hi there,

    Well, I've tried the various code snippets found here in forum and elsewhere to remove post meta from my CPT brand all to no avail, so thought I would post to see if someone might be able to help.

    Any suggestions and direction for how to do this would be very much appreciated.

    Thank you, Yael


    Web developer. WordPress and Genesis Junkie. Yoga lover and aspiring peace maker.

    http://184.154.231.4/~kitche11/
    February 11, 2014 at 7:44 am #89789
    Brad Dalton
    Participant

    For the archive page or single CPT's?

    Simply add the conditional tag for a CPT after the function in the PHP code.


    Tutorials for StudioPress Themes.

    February 11, 2014 at 8:09 am #89795
    pixelhappy
    Member

    Hi Brad,

    For single CPT's. Can you expand just a little for me -- I'm not completely clear on how to do this.


    Web developer. WordPress and Genesis Junkie. Yoga lover and aspiring peace maker.

    February 11, 2014 at 8:11 am #89797
    Brad Dalton
    Participant

    Did you check the Codex? You'll find the conditional tags for CPT's there.

    Then add it after the function

    add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
    function sp_post_meta_filter($post_meta) {
    //Add Custom Post Type Conditional Tag Here
    	$post_meta = '[post_categories] [post_tags]';
    	return $post_meta;
    }
    

    A Post Type

    get_post_type() 

    Not really a conditional tag, but returns the registered post type of the current post.

    if ( 'book' == get_post_type() )

    Tests to see if the current post is of type 'book'.

    is_singular()

    Returns true for any is_single, is_page, and is_attachment. It does allow testing for post types.

    post_type_exists() 

    Returns true if a given post type is a registered post type. This does not test if a post is a certain post_type. Note: This function replaces a function called is_post_type which existed briefly in 3.0 development.


    Tutorials for StudioPress Themes.

    February 12, 2014 at 2:28 am #89931
    pixelhappy
    Member

    Thanks for the info, Brad. I'll try to sort it out with the info you provided.

    Yael


    Web developer. WordPress and Genesis Junkie. Yoga lover and aspiring peace maker.

    February 13, 2014 at 5:40 am #90109
    pixelhappy
    Member

    This worked for me:

    // remove post info, post meta, and title from cpt
    add_action ('get_header', 'tx_remove_post_info');
    function tx_remove_post_info() {
    if ('CPTNAME' == get_post_type()) {
    remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    remove_action( 'genesis_entry_footer', 'genesis_post_meta' );

    }
    }


    Web developer. WordPress and Genesis Junkie. Yoga lover and aspiring peace maker.

  • 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

© 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