Skip Navigation

[Resolved] Hide Author in the View of a new Custom Post Type

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user has created a content template, but he gets the title and meta information on the frontend that he does not expect.

Solution:
These parts are added by the theme. They need to be removed using code or custom CSS. Check this reply https://toolset.com/forums/topic/hide-author-in-the-view-of-a-new-custom-post-type/#post-1927919

Relevant Documentation:

This support ticket is created 4 years 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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by soniaS 4 years ago.

Assisted by: Jamal.

Author
Posts
#1927683
ToolSet5.png

Hi
Creating a View in WordPress for my new Custom Post Type (Trainer) I get a layout showing the author and title information that is not part of the template (yellow part) and I can't modify. How can hide these parts?

hidden link

I followed the documentation

https://toolset.com/lesson-placement/lesson-placements-1621261-1622283/

I don't know if it is a coincidence but before the last update of your plugins and the theme I create a another custom type without this problem but I do not exclude that some settings were wrong

Can you help me?
Thanks

#1927919

Hello and thank you for contacting the Toolset support.

It seems to me that the title, the author, and the post date are generated from the theme instead of the content template. The content template only replaces the content that will be produced by the_content() function. Maybe this screenshot explains better hidden link
Maybe this article can help understand that further https://toolset.com/documentation/programmer-reference/theme-support-for-content-templates/

So, to answer your question, How can hide these parts?, I suggest ONE of the following:
- Hiding the part using CSS, by adding the following CSS code to the content template:

.uk-article .uk-article-meta {
    display: none;
}

- Or, overwriting the theme's template in a child theme, and removing that part from it. Read more about WordPress templates hierarchy here https://developer.wordpress.org/themes/basics/template-hierarchy/
- Or, building your own template for this custom post type. Check this article https://toolset.com/documentation/customizing-sites-using-php/creating-templates-single-custom-posts/

I hope this helps. Let me know if you have any questions.

#1933725

My issue is resolved now. Thank you!