How to remove post info from custom post type only

Community Forums Forums General Discussion How to remove post info from custom post type only

This topic is: not resolved

This topic contains 8 replies, has 2 voices, and was last updated by  babrees 4 months, 3 weeks ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #98707

    babrees
    Participant
    Post count: 61

    Hi. As the subject says :)

    I have a custom post type called Products and I want to remove the post info (date and author) from this type only.

    Cheers!

    • This topic was modified 4 months, 4 weeks ago by  babrees.
    • This topic was modified 4 months, 4 weeks ago by  babrees.
    http://www.bramblebeefarm.co.uk
    #98712

    braddalton
    Participant
    Post count: 9401

    From the single or archive page template?

    You can use one of the StudioPress custom functions, with a conditional tag for your custom post type.

    Or add the remove action directly to a template.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #98792

    babrees
    Participant
    Post count: 61

    Thanks Brad! I struggled with the conditional tag but managed it in the end :D

    BTW, the Studio Press code snippet is incorrect for the latest versions of Genesis.

    #98793

    babrees
    Participant
    Post count: 61

    aaahh, I spoke too soon! I see that it didn’t work as it has removed it from ALL posts, so I have obviously done it wrong :(

    #98863

    braddalton
    Participant
    Post count: 9401

    Add this to the file.

    [php]
    //* Remove the entry meta in the entry header (requires HTML5 theme support)
    remove_action( ‘genesis_entry_header’, ‘genesis_post_info’, 12 );
    [/php]


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #98889

    babrees
    Participant
    Post count: 61

    Hi Brad. Thanks but that’s not my problem and I use it all the time. My problem is restricting it to custom post type called Product

    #98996

    braddalton
    Participant
    Post count: 9401

    See this post for full and comprehensive solutions http://wpsites.net/web-design/how-to-remove-post-info-from-custom-post-type-only-in-genesis/


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #99017

    babrees
    Participant
    Post count: 61

    Hi Brad. Thanks but PLEASE, remove “Paul from Bramble Bee Farm” from your post. If you would like a name you can put my name, which is Jill.

    I never gave a thought to using .css! I have now done it that way.

    Thanks

    #99452

    babrees
    Participant
    Post count: 61

    Hi Brad, thanks for changing the name but could you please remove Bramble Bee Farm from your post.

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

You must be logged in to reply to this topic.