Skip Navigation

[Resolved] CPT custom field content not being displayed

This support ticket is created 6 years, 2 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 2 voices.

Last updated by ScottH7099 6 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1144436

I am trying to: Use Toolset with Enfold

Link to a page where the issue can be seen:

I expected to see: Custom field data from the CPT Provider

Instead, I got: Nothing

Please note that the archive page for the CPT IS working, just no the single post page.

I've tried some of the solutions I've seen in the forum, but it's not working. Currently I have a single-provider.php file in my child theme's folder. I know this file is being used because I've put a simple echo line in it to verify. I've commented out...
get_template_part( 'includes/loop', 'index' );
...and replaced it with...
the_content();
This has not worked for me.

Here's the thing: Currently this site is in development and is on my development machine. I'm using the URL hidden link, which I've set up in my hosts file. I got the single site version of Toolset and so have not yet registered a site in my account. Could this by why I'm not seeing single post results? If so what URL should I register in order to be able to use it on my development box and on the live server. I really don't want to use just "localhost" because I have multiple sites on my dev machine and am usually working on more than one at any given time.

Can I register the URL above as the local version and still register the live URL when it's ready?

I used the Toolset Debug Info link to obtain the info below. I hope it's what you're looking for.

Thanks!

#1144519

Hi, if Content Templates assigned to this CPT are not displaying on the front-end of your site, please follow the guide here to determine the best way to integrate with your theme:
https://toolset.com/documentation/user-guides/theme-support-for-content-templates/

I expected to see: Custom field data from the CPT Provider
Can you share the code from the Content Template or your single-provider.php template used to display the custom field data?

I got the single site version of Toolset and so have not yet registered a site in my account. Could this by why I'm not seeing single post results?
No, the Toolset suite should function normally without being registered. You must update the plugins manually in an unregistered site, but functionality should not be negatively impacted. When you have a single site license, we recommend registering the production URL and leaving your local development environment unregistered. It will be a bit more tedious to update plugin versions, but shouldn't be a major problem.

#1146054

Hi Christian:

I found that Enfold is very non-standard. Within the files in the theme's root folder, like page.php, single.php, archive.php, etc., they call other files in an include/ folder called loop-*.php, such as loop-index.php or loop-page.php. It's in those files that they actually present the content. And to be even more non-standard, not only do they not use the_content(), they don't even use a function directly at that point. Higher up in the code, they use a function that extracts ALL the WP data into variables and then use those variables where the content is actually to be displayed. So for me (at least so far) the only file I needed to modify was loop-index.php, a copy of which I put in an include/ folder in my child theme folder. I found that...

echo $content_output;

...is where they display the post content. So I put all the default WP post types into a comma delimited string variable then checked to see if the current post type was in the string or not. If the current post is a default WP post type, I use the Enfold code above. If it's my custom post type, I use...

echo the_content();

...so Toolset can display my custom post and its custom field data. This allows the Toolset content template to work.

For any other Enfold users who may read this, PLEASE NOTE that on this particular site, I am using the standard WP editor; I am NOT using the Enfold Advanced Layout Builder.

#1146068

Okay thank you for providing that information for other Enfold users.

#1148564

My issue is resolved now. Thank you!