Skip Navigation

[Resolved] Hide post title, meta on all custom post types, but not the 'post' post type

This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by matthewS-8 6 years, 4 months ago.

Author
Posts
#957383

Tell us what you are trying to do?
Need assistance on how to setup a custom post type template to display only the header and then whatever content pulled out of toolset database. Do not want to include Post Title or Meta information. Looking for a "plain" template.

Is there any documentation that you are following?
Trying to follow both Toolset and Total theme documentation, but am having no luck. I've done some modifiing of the functions.php file, but not having much luck calling the right functions. Was able to "hide the post title and met via a css in the "house" template. But don't feel like this is the best way to do that. Looking for a more global way of handling this.

Is there a similar example that we can see?

What is the link to your site?

hidden link

#957909

WordPress Themes are using the WordPress API which separates the content, title, and other elements in single items.

In a page, as you see it in the browser, you will mean to have a Post (with it's title, right), and maybe even tags, and obviously content.
It is right that this all belongs to the post - but it is displayed each with it's pwn function.

Toolset, replaces only one of all those functions:
the_content().

You can imagine, it displays only the content (post body) of the post, not its title or else.
Hence, when you use any common theme that works with WordPress, you have usually 2 chances within the Theme itself:
Either none, or you can customize for example if you want to see or not the title, the meta data, etc.
Only advanced Themes offer those settings, because, well, if they offer you to disable them, they need to offer you something to still display the data, right?

And that is where Custom Post Type ready themes are interesting.
Those are themes as listed here:
https://toolset.com/documentation/recommended-themes/

Those often offer such options, and nicely integrate them to Toolset Views (Content Templates) and Toolset Layouts (Template Layouts) so you can control them on your Custom Post Types and native types as well.

That though usually still doesn't allow you enough control.

I have stumbled over the same issue as you described a few years ago, and I found Toolset.
Back then, we used to integrate Toolset Layouts manually to a theme and that, is most likely what you will love most, but I am not sure how far you want to dive.

If you do that you can fully control the entire template, from and inclusive header to footer.
But you will beed to use Toolset Layouts for this, and a Theme that is manually integrated.

If you are interested, this is full custom code, but you can have a look at this theme - it's very easy to understand as well documented within the code:
hidden link

You can freely use it, and if you download it right now with Toolset you will be able to create a new layout for your pages that will cover everything from the header to footer.
If you want to control as well header and footer separately, then you can alter the code in that theme.

As a summary of solutions you have here:
1. Choose a Theme that uses the_content() and offers exactly the settings you need
2. Customize a current theme in a child theme and use only the_content in the child theme's loop. Then, control that with a Content Template in Views.
3. To the same as above, but with Layouts
4. Use a Custom theme as I linked.

The idea of a custom theme may sound scary at first, but you are already in functions.php I see 🙂
Once you understand the Theme API of WordPress, with the boilerplate above (which is based on Bootstrap 3.x) you will have the exact theme you need, and can edit everything you want, in the backend only.

Actually the Theme linked does not require any edit to have the outcome you would like.
But as said, that is not a Toolset product, so you would need to maintain your own version of it.

It's however a good reference to customize any theme and integrate Toolset in this way.

The themes I linked here, mostly as well provide the settings you need:
https://toolset.com/documentation/recommended-themes/

Surely DIVI has a control for the Post title and meta, I am not 100% sure about the Theme settings of the other houses, there are many.

#1071688

I was able to create custom_single_page.php documents and place into my child theme that did not include the title, meta or featured image. That was the fix.