Archived topic
Hide elements for custom post type
7 replies · Started by Daniel on February 16, 2016
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?
Hi Daniel,
Any chance you can link me to the post type?
Sure, here it is: http://www.retrobitios.com/retrogaming-art/nintendo-nes-royal-purple/
I've hidden the sidebar, title and header by hand.
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?
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
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 :)
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/
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 :)
