[Resolved] Function to remove entry-header and featured-image

Home Forums Support [Resolved] Function to remove entry-header and featured-image

Home Forums Support Function to remove entry-header and featured-image

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1261501
    Fabien

    Hi,

    Is there a function to remove the header (cf. entry header) fully and the featured image ?

    Thanks

    #1261535
    Leo
    Staff
    Customer Support

    Hi there,

    Just to confirm, so basically you only want to use the excerpt on the posts/archive pages?

    #1261688
    Fabien

    Nope 😉

    I just want to remove/hide the post title and the thumbnail of my CPT by using a php function and not elements.

    #1262131
    Tom
    Lead Developer
    Lead Developer

    Would this be on single posts or in the archive?

    #1262534
    Fabien

    Hi Tom,

    Single post !

    #1263497
    Tom
    Lead Developer
    Lead Developer

    Give this a shot:

    add_filter( 'generate_show_title', function( $show ) {
        if ( is_singular( 'your-post-type' ) ) {
            return false;
        }
    
        return $show;
    } );

    For the featured image, any chance you can link me to one of the posts?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.