Metadata
-
Hello,
I am using a plugin that allow me to set custom metadata (title,desc,keywords) on every post/page. Is it possible to make more-lang add support to custom meta?Regards
-
just to let you know, updating to 2.1.2 conflicted with the editing you suggested in functions.php :
add_filter('option_responsive_theme_options', 'responsive_theme_options_filter', 10, 2); function responsive_theme_options_filter($value, $option) { $cur_locale = morelang\ml_get_locale(); switch( $cur_locale ) { case 'en_GB' and so onsite was giving one of those messages when user frack up with functions.php, had to revert back to old more-lang version.
Error Details ============= An error of type E_ERROR was caused in line 36 of the file /var/www/mysite.org/wp-content/themes/responsive-child/functions.php. Error message: Uncaught Error: Call to undefined function morelang\ml_get_locale() in /var/www/mysite.org/wp-content/themes/responsive-child/functions.php:36 Stack trace: #0 /var/www/mysite.org/wp-includes/class-wp-hook.php(287): responsive_theme_options_filter(Array, 'responsive_them...') #1 /var/www/mysite.org/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array) #2 /var/www/mysite.org/wp-includes/option.php(152): apply_filters('option_responsi...', Array, 'responsive_them...') #3 /var/www/mysite.org/wp-content/themes/responsive/core/includes/functions.php(77): get_option('responsive_them...', Array) #4 /var/www/mysite.org/wp-content/themes/responsive/core/includes/functions.php(62): Responsive\Core\responsive_get_options() #5 /var/www/mysite.org/wp-content/themes/responsive/functions.php(28): require('/var/www/mysite...') #6 /var/www/mysite.org/wp-settings.php(508): include('/var/www/mysite...') #7 /var/www/mysite.org/wp-config.php(90): require_once('/var/www/mysi-
This reply was modified 5 years, 11 months ago by
wp_ris.
Hi wp_ris, the site issue has nothing to do with the new More-Lang release, it’s because the code posted by me is a draft(just to give you a hint), it fails when re-activating More-Lang. In production, you can add the following line to the beginning of ‘responsive_theme_options_filter’ to fix the issue:
if (! function_exists('morelang\ml_get_locale')) return $value;
And regarding “support to custom meta”, I’m not sure what’s your meaning, did you replace the Add Meta Tags plugin with another?Hello,
where exactly should i add the line?
and about Add Meta Tags, no i still use it, which line in my comments are you referring to?Hi wp_ris, add it just before the ‘$cur_locale = morelang\ml_get_locale();’. You asked “Is it possible to make more-lang add support to custom meta?”, I think Add Meta Tags was already supported.
Thank you, it worked
Hi wp_ris,
Actually the two lines “if (! function_exists(‘morelang\ml_get_locale’)) return $value;” and “$cur_locale = morelang\ml_get_locale();” can be replaced with a single line:
$cur_locale = get_locale();
(Because I frequently used “ml_get_locale()”, I neglected this concise one which can be used in your theme)
Regards!thx!
Hello, i lost info to log in the morelang website and download the new pro releases, i have sent an email to your paypal email but no luck, so here i have to ask for it, PP transaction was 0L719565N86396735.
Hi wp_ris, More-Lang Pro 1.5.0 added “Translate Options” module, it makes the Responsive theme home page translatable. The guide: Translate Options. Add “responsive_theme_options” to the “Selecte the options expected to be translated” list.
Tested and works!
Thanks!
-
This reply was modified 5 years, 11 months ago by
The topic ‘Metadata’ is closed to new replies.