How to Remove Post Info in Custom Post Types

Community Forums Forums Design Tips and Tricks How to Remove Post Info in Custom Post Types

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  shewearswhite 1 year, 10 months ago.

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

    shewearswhite
    Participant
    Post count: 15

    Hi all,

    I’m looking for help to remove the post info from custom post types. I’ve figured out how to remove it from all posts but this is not exactly ideal. I’m using the plugin ‘Custom Post Type UI’ to create my custom posts.

    My website is http://www.shewearswhite.com

    Thank you!

    Katie

    #15135

    SoZo
    Moderator
    Post count: 1573

    You’d need to put the remove action into a function using the post type conditional


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #15175

    shewearswhite
    Participant
    Post count: 15

    Thanks SoZo,

    I tried inserting the following code into my functions.php however it removed the post info from ALL posts not just my custom post type. Can you see where I’m going wrong?
    function custom_post_info($post_info)
    {
    global $post;
    if(get_post_type($post->ID) == 'post_type_name' )
    {
    return false;
    }
    else
    {
    return $post_info;
    }
    }
    add_filter('genesis_post_info', 'custom_post_info ');

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

You must be logged in to reply to this topic.