• Resolved wp_ris

    (@wp_ris)


    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

Viewing 15 replies - 1 through 15 (of 25 total)
  • Hello wp_ris,
    More-Lang supports the default Custom Field inputs of WordPress, as for other metadata plugins(and which is your plugin?), because they usually have different behaviors, More-Lang doesn’t support any specific one. If your plugin is not supported, you can try to open the Custom Fields in a Post, if the “title,desc,keywords” are there, you can translate them.
    Regards!

    Thread Starter wp_ris

    (@wp_ris)

    Hi wp_ris,
    Because the meta fields’ first characters are “_”, which are protected by default, so the Custom Fields panel doesn’t show them.
    To add the meta fields to the Custom Fields panel, you can add the following code to the functions.php of the activated theme:

    function ml_addmetatag_is_protected_meta($protected, $meta_key, $meta_type) {
    	if (in_array($meta_key, ['_amt_title', '_amt_keywords', '_amt_description'])) return FALSE;
    	return $protected;
    }
    add_filter('is_protected_meta', 'ml_addmetatag_is_protected_meta', 10, 3);
    

    And an option will be added to the More-Lang Special to handle this type of issue, if you would not like to change your code, you can wait for the next release of More-Lang Special(in 8~10 days).
    Thanks!

    Thread Starter wp_ris

    (@wp_ris)

    Great, it works,
    I have bought your pro to thank you for the courtesy of your replies, never seen such a support. thanks again

    Hi wp_ris, thanks a lot for your order!

    More-Lang Special 1.1.0 is available now, the “Post metas support” section can fix this type of issues:
    https://www.morelang.com/more-lang-special/

    • This reply was modified 4 years, 8 months ago by clivezhg.
    • This reply was modified 4 years, 8 months ago by clivezhg.
    Thread Starter wp_ris

    (@wp_ris)

    Impressive! Thank You!

    Just a note maybe to be added to customers: if main custom field is not used it will not show up in the special dropdown menu. I had _amt_title not showing because i did not set one any where ..

    Thread Starter wp_ris

    (@wp_ris)

    btw, is there any way to make it work with custom front page? I have a theme called responsive by cyberchimps and I am using its custom front page which does not allow much editing.. what do you think would it be a work around?
    At the moment im using new page for each lang and then with other plugins hiding the page from navigation, also injecting hreflang in the front page.

    PS: not asking for more work ?? just giving you hints about features.

    Thanks again!

    Hi wp_ris,
    I will add the note mentioned by you in the next release. Regarding the custom front page issue, because I’m not familiar with the scenario (the responsive by cyberchimps is not available for free), I don’t have any good idea about it, sorry for that.
    Thanks!

    Thread Starter wp_ris

    (@wp_ris)

    btw the responsive theme is free and pro, can be installed from the add theme section, name is just “responsive”

    Hi wp_ris,
    The Responsive theme’s custom front page is not implemented in normal way, it doesn’t create a real WordPress Page, it uses the options to generate the front page when being requested.
    More-Lang will not support this type of custom front page. If you have some coding experience, I recommend using coding, something like the following:

    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': // non-default language
    			$value['home_headline'] = 'headline in English...';
    			$value['home_subheadline'] = 'subheadline in English...';
    			$value['home_content_area'] = 'content_area in English...';
    			// more fields
    			break;
    	}
    	return $value;
    }
    Thread Starter wp_ris

    (@wp_ris)

    so great.. and with your special add-on, widgets can be edited too.

    I feel in debt, thank you!

    Hi wp_ris, never mind. BTW, the More-Lang Special will not be continued, its functions will be merged into the More-Lang (to be released in the beginning of August). Thanks!

    Thread Starter wp_ris

    (@wp_ris)

    I am messing around trying to set for the custom front page the meta desc and meta keywords for each language i have set in function.php but no clue.. do you think they can be set?

    Hi wp_ris, as I mentioned above, the Responsive theme’s custom front page is not a real WordPress Page, and the Add Meta Tags plugin’s setting must attach to a real WordPress Post, so I think they cannot be set on the GUI (maybe a feasible way is to modify the related PHP files).

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘Metadata’ is closed to new replies.