Fix limit on template conditionals for multilingual sites
We have a site with more than 99 languages. The headers are translated through WPML which brings forth an individual header template for each language so we have more than 99 header templates.
However your code shows that you've set a limit to 99 templates. This caused problems with some locales.
We request that you find a more elegant fix than limiting the number of locales.
The code can be found here:
wp-content/themes/betheme/functions/builder/class-mfn-builder-admin.php
around lines 3657 + 3839
It's this code:
$templates = $wpdb->get_results( "SELECT p.ID, p.post_title FROM {$wpdb->prefix}posts as p JOIN {$wpdb->prefix}postmeta as m on p.ID = m.post_id WHERE p.post_type = 'template' and p.post_status = 'publish' and m.meta_key = 'mfn_template_type' and m.meta_value = '{$type}' LIMIT 99" );
Thank you.
Comments
We were searching for another solution for that, but unfortunately, there is no "more elegant fix" for that.
At the moment, I can suggest increasing this value in a child theme for your purposes, and we will increase that in our theme in the upcoming update.
Best regards
The increase in the upcoming update is an elegant fix.
Since this is a hardcoded function in the BeTheme, I would love some suggestions on how to increase the limit in the child theme.
To achieve that with a child theme, copy this file with the whole path to it from parent theme to child, and change the LIMIT to 200.
When we release an update with this fix, you can remove this file to prevent possible future issues.
Best regards