Remove Info and Meta on Custom Post Type

Community Forums Forums Design Tips and Tricks Remove Info and Meta on Custom Post Type

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  nikcree 3 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #84313

    nikcree
    Participant
    Post count: 7

    I am trying to remove the Meta and info from the custom post type
    ‘testimonials’ without much success. I have the following in the functions
    file:

    add_action(‘template_redirect’, ‘remove_info_meta_testimonials_post_type’);
    function remove_info_meta_testimonials_post_type() {
    if( post_type_exists(‘testimonials’) || is_post_type_archive(‘testimonials’) )
    remove_action(‘genesis_before_post_content’, ‘genesis_post_info’);
    remove_action(‘genesis_after_post_content’, ‘genesis_post_meta’);
    }

    I also tried:

    // Remove Info and Meta from Testimonials Custom Post Type
    add_action(‘template_redirect’, ‘remove_info_meta_testimonials_post_type’);
    function remove_info_meta_testimonials_post_type() {
    if ( ‘testimonials’ == get_post_type() )
    remove_action(‘genesis_before_post_content’, ‘genesis_post_info’);
    remove_action(‘genesis_after_post_content’, ‘genesis_post_meta’);
    }

    Neither worked. Does anyone have other pointers that may help? Many thanks

    http://www.logicalcoaching.com.au/testimonials/my-biggest-year-in-real-estate/
    #84322

    braddalton
    Participant
    Post count: 7467

    That code only works for themes running XHTML markup.

    You’ll need the code for HTML 5 themes http://my.studiopress.com/snippets/


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #84326

    nikcree
    Participant
    Post count: 7

    Thanks Brad – Yep, just realised all my code snippets are the pre-HTML5 ones. Have to update my library. Thanks again.

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

You must be logged in to reply to this topic.