Skip Navigation

[Resolved] Override theme's post default content

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

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: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by nickT-2 7 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#539945

Hi,
I am using a custom post type and the theme I am using is adding a featured image, author tag, and inserting a side bar ... and then displaying my assigned content template underneath.

The only way to solve this is to manually add a empty row in visual composer.

Example urls
Not correct: hidden link
Correct: hidden link

(Change the (dot) to a "." for links to work)

So my question ... is it possible to remove this default content on the custom post. Or maybe to set an empty row as default in the editor field instead. Or is there another way to fix this content template & custom post type to avoid having to manually fix 100s of posts.
Thanks
Nick

#540034

Dear Nick,

It depends on how do you setup the "default content" and how do you output it.
If the "default content" is outputted from your theme file, you will need to locate the PHP codes for rendering the "default content" and remove it. For example, your custom post type is "country-page", you can create a theme file "single-country-page.php", it will take effect on single "country-page" post.
More help:
https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
single-{post-type}.php – If the post type is product, WordPress would look for single-product.php.

#540054

Awesome! All fixed thank you.

The easiest way I found was to take the page template from the theme and renamed as you suggested and poped into my child theme and by magic all custom posts are fixed!

Thanks so much