Hi Hadi,
Thank you for sharing the admin access for the other website.
Shane is on vacation and will be back next week, so I'll be following up on this ticket.
I noticed that the layout "Template for Posts" is working as expected for the single post pages on this other website.
To troubleshoot why this is working on one website with "YOOtheme" and not on the other one, I'll need to thoroughly compare the clones of these two websites, on my own server.
Do I have your permission to download the fresh clones from these websites, using the Duplicator plugin?
regards,
Waqar
Hi Waqar ,
Yes, you have the permission.
Thank you
Hi Hadi,
Thank you for your permission and I've downloaded duplicator packages from both these websites.
I'll perform some tests and will update you with my findings.
regards,
Waqar
Hi Hadi,
I just wanted to update you that I've managed to narrow down few differences between the two websites and I'll share my detailed findings with you today.
Thank you for your patience.
regards,
Waqar
Hi Hadi,
Thank you for waiting as this troubleshooting, took longer than initially expected.
During testing on these clones and on my own test website, I discovered that the Layouts assigned to single post pages, don't apply on the front-end when using YOOtheme.
This seems to be happening only with newer versions of the theme as with older versions like 1.20.6 or 1.21.10, the layouts work correctly.
Appreciate you brought this forward and I've shared these findings with the concerned team. I'll keep you updated on the progress through this ticket.
For now, a workaround can be to keep using the older 1.21.10 version of the theme on your websites.
regards,
Waqar
Hi Hadi,
I just wanted to update that our compatibility team has contacted the YOOtheme to inform them about this compatibility issue, along with some suggestions.
In their newer releases, they're calling post content using functions that are not considered WordPress' theme development standard and this is expected to result in more compatibility issues with other WordPress plugins as well.
If you'd like to continue using this theme, we'll recommend getting in touch with their support team too, to let them know that maintaining compatibility with Toolset (and other WordPress plugins) is important for you.
For a quick fix, you can register a custom function to get the post's content in WordPress' standard way and then call it in theme's single post templates.
Example:
function my_custom_content_func() {
// Apply filter from 'the_content()' (wp-includes/post-template.php)
$content = apply_filters('the_content', get_the_content(''));
$content = str_replace(']]>', ']]>', $content);
return $content;
}
The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through active theme's "functions.php" file.
Next, in the theme's single post content templates ( e.g. /yootheme/templates/post/content.php ) you can call this function like this:
echo my_custom_content_func();
I hope this helps and please let us know if you hear back from the theme author.
Hi Hadi,
We've received confirmation from YOOtheme that a fix for this will be included in the next release.
Thank you for bringing this forward and please update the theme to the latest version, once it is out.
regards,
Waqar