Skip Navigation

[Gelöst] Upgraded my theme now content template isn't loading properly

This support ticket is created vor 5 Jahren, 10 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Travis vor 5 Jahren, 10 Monaten.

Assistiert von: Shane.

Author
Artikel
#1177095

Tell us what you are trying to do?
Everything worked fine until I upgraded my theme to the latest version. I use a custom child theme of Uncode as the base.
You can see the live, working version here: versteckter Link and in particular, here's a page that uses Content Template to load the custom post content:
versteckter Link

And here is the broken version on our staging server:
versteckter Link

The only difference between the two codebases is the staging server has the most recent versions of both Uncode and Toolset. The content template stopped loading after upgrading the theme, not after upgrading the Toolset plugins.If I revert to twentyseventeen or another theme, the content template loads fine so it's obviously the theme.
I know you can't provide support specific to 3rd party themes, but I'm hoping you can help me at least diagnose this further and perhaps there's a workaround you're aware of.

Is there any documentation that you are following?
I've already turned on theme debugging, as you can see from the staging server URL. From the looks of things post content is all being built within a while loop instead of being fed as a variable to a function like the_content()

Is there a similar example that we can see?

What is the link to your site?

#1177133

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Travis,

You can respond here when the theme support replies.

Thanks,
Shane

#1177141

Hi Shane,

Thanks for your help this afternoon.
I've found a solution with the help of this forum topic:
https://toolset.com/forums/topic/the-theme-uncode-does-not-play-nice-with-toolset/

At the bottom of my single-trip.php custom post type template file, there's this:

	/** Display post html **/
	echo 	'<article id="post-'. get_the_ID().'" class="'.implode(' ', get_post_class('page-body' . $bg_color)) .'">
          <div class="post-wrapper">
          	<div class="post-body">' . uncode_remove_wpautop($the_content) . '</div>' .
          	$navigation_content . '
          </div>
        </article>';

I tried registering the uncode_remove_wpautop function in Toolset's front end content settings, but it still didn't work.

So I changed the template code itself to the following and it works great now:

	/** Display post html **/
	echo 	'<article id="post-'. get_the_ID().'" class="'.implode(' ', get_post_class('page-body' . $bg_color)) .'">
          <div class="post-wrapper">
          	<div class="post-body">' . the_content() . '</div>' .
          	$navigation_content . '
          </div>
        </article>';

Thanks again for all your great help.
Travis