Hide elements for custom post type

Home Forums Support Hide elements for custom post type

Home Forums Support Hide elements for custom post type

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #173090
    Daniel

    Hi!

    I’ve created a custom post type called art.
    I want to disable the post image and content title for this cpt. Is it possible to do it with a function instead of hiding them manually?

    #173157
    Tom
    Lead Developer
    Lead Developer

    Hi Daniel,

    Any chance you can link me to the post type?

    #173305
    Daniel

    Sure, here it is: http://www.retrobitios.com/retrogaming-art/nintendo-nes-royal-purple/

    I’ve hidden the sidebar, title and header by hand.

    #173367
    Tom
    Lead Developer
    Lead Developer

    So you want to hide the main title and image on that page so there’s only the “Nintendo NES Royal Purple Products” section left?

    #173807
    Daniel

    Hi

    I’ve hidden the post title and image using the options in Generate press. The title and image in that page are custom made. The sidebar is also hidden.

    I can hide those elements every time I create a new post, but I wanted to know if it was possible to do it automatically using a function or something else for this particular custom post type.

    Thanks!
    Daniel

    #173873
    Tom
    Lead Developer
    Lead Developer

    Any chance you can show me a post where you haven’t hidden them? That will help me come up with the right code to give you ๐Ÿ™‚

    #175914
    Daniel

    Hi!

    Here it is an example post with everything active:
    http://www.retrobitios.com/console/nintendo-super-famicon-french-vanilla/
    I’d like to remove the Title, the featured image in the header and the sidebar for this particular post type.
    I’d like to keep the smaller featured image and the title next to it.

    By the way, thanks for your help. I thought getting rid of those elements was easier than it is. I tried to make them look like a woocommerce product page like this: http://www.retrobitios.com/product/sega-genesis-green-tea/

    #175942
    Tom
    Lead Developer
    Lead Developer

    To remove the featured image and title, you can do this:

    .single-console .page-header-image-single, 
    .single-console .entry-header {
        display: none;
    }

    For the sidebar, you should be able to do this: https://generatepress.com/knowledgebase/choosing-sidebar-layouts/#metabox

    Let me know ๐Ÿ™‚

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