Hi @disca91,
Have you seen our documentation on q-translate and translations? https://www.wp-timelineexpress.com/documentation/qtranslate-languages-not-loading-properly/
In short, we have a set of caching mechanisms built into the plugin that decrease page load speeds by caching the database queries and a few other things. This prevents us from having to re-run these queries on each page load.
If you’ve set up translations and checked the page, then the cache is going to be stored in that language. However, you can ‘disable’ the cache on the timeline so that when the language is switched, the proper translations are loaded.
Feel free to take a look at the documentation above for assistance.
For quick reference, the code snippet proposed in the knowledge base article is:
/**
* Clear Timeline Express cache on qtranslate pages
*
* @author Code Parrots
*/
function timeline_qtranslate_bust_cache() {
global $post;
if ( ! isset( $post->ID ) || false === get_transient( "timeline-express-query-{$post->ID}" ) ) {
return;
}
delete_transient( "timeline-express-query-{$post->ID}" );
}
add_action( 'qtranslate_head_add_css', 'timeline_qtranslate_bust_cache' );
You’ll want to add that to your themes functions.php file, or into a custom plugin. If you are unsure of how to edit the themes functions.php file you can use another plugin such as My Custom Functions to add it right from the dashboard.
Let us know if that works on your end!
Hi @disca91,
This snippet will be introduced into our next release, version 1.5.2, so users don’t have to worry about adding the snippet themselves. This snippet will be active when q-translate is installed and active. Feel free to update to receive the patch.
This is now included in the 1.5.2 release that was just pushed out to the WordPress repository.
If for some reason you are still encountering issues, please don’t hesitate to post back here and let us know.
Thanks again.
I’m going to update the plugin right now, adding the code to function.php didn’t work