Skip Navigation

[Resolved] Custom Page Type is Empty

This support ticket is created 3 years, 6 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/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 3 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#2149089
CleanShot 2021-08-22 at 22.42.28.png

Tell us what you are trying to do?
Added Custome Post Type
Added CPT Template using Toolset
The page is empty, and not displaying content
hidden link

Is there any documentation that you are following?
Yes

Is there a similar example that we can see?
hidden link

What is the link to your site?

Thanks
Shovan

#2149303

Hi Shovan,

Thank you for contacting us and I'd be happy to assist.

If you'll check your active theme's "index.php" file (that controls the output for the default pages), you'll see that the code with the "the_content()" function is included in the div with class "container", to show the current page's content.
( screenshot: hidden link )

However, in the file "single.php" (that controls the output for the single post pages), no content is added inside that div with class "container".
( screenshot: hidden link )

This is why the content is showing properly on the single pages, but not on the single "definition" posts (and on other post types).

You can copy the missing code from the theme's "index.php" file into the "single.php" file and the content from the assigned template will start showing.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar