• Resolved sashakor

    (@sashakor)


    Hello, I wanted to clarify, in countries it is possible to create variables that will be displayed in seo in the future (description h1)?

    For example, if I am in America, use the variable to output the title “site in America”

    Thank you

    • This topic was modified 3 years, 6 months ago by sashakor.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Anghel Emanuel

    (@anghelemanuel99)

    Hello there,

    Thank you for letting us know about your problem!

    Actually,we don`t have support for variables, however you can translate the SEO page title in such a way that it will simply contain Site For USA or something of sorts.

    If there`s anything else, please let me know!

    Kind Regards,

    Thread Starter sashakor

    (@sashakor)

    Hello, I have brought an additional field for THE countries https://cln.sh/F0Izvc “seo”
    And then I just created a variable for yoast and it worked.

    function get_town() {

    $lang = $_COOKIE[‘trp_language’] ?? ‘ru_RU’;
    $lang = strtolower($lang);
    $end = get_option(‘language_end_title_’.$lang,”);
    return $end;

    }

    // define the action for register yoast_variable replacments
    function register_custom_yoast_variables_town() {
    wpseo_register_var_replacement( ‘%%town%%’, ‘get_town’, ‘advanced’, ‘some help text’ );
    }

    // Add action
    add_action(‘wpseo_register_extra_replacements’, ‘register_custom_yoast_variabless_town’);`

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Variable for countries’ is closed to new replies.