Skip Navigation

[Resuelto] Upgraded my theme now content template isn't loading properly

This support ticket is created hace 5 años, 11 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por Travis hace 5 años, 11 meses.

Asistido por: Shane.

Autor
Mensajes
#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: enlace oculto and in particular, here's a page that uses Content Template to load the custom post content:
enlace oculto

And here is the broken version on our staging server:
enlace oculto

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

Idiomas: Inglés (English )

Zona horaria: 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