• Resolved wladi

    (@wladi)


    Здравствуйте, я хочу использовать значение meta name=”description” в дополнительном заголовке. Подскажите как я могу запросить значение meta name=”description” которое формируется данным плагином для текущей страницы. Заранее спасибо. Я так же переведу данный текст через гугл-переводчик, так что простите меня если фразы будут иметь корявый перевод.

    Hello, I want to use the value of the meta name = “description” in the additional header. Tell me how I can request the value of the meta name = “description” which is formed by this plugin for the current page. Thank you in advance. I will also translate this text through a Google translator, so forgive me if the phrases will have a clumsy translation.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi, wladi!

    Thanks for translating both your comment and the plugin!

    This is the code you’d want to use to obtain the description:

    if ( function_exists( 'the_seo_framework' ) ) {
    	$tsf = the_seo_framework();
    	if ( $tsf->loaded ) {
    		$desc_used      = $tsf->get_description();
    		// $desc_custom    = $tsf->get_description_from_custom_field();
    		// $desc_generated = $tsf->get_generated_description();
    	}
    }

    $desc_used will first try to get $desc_custom. When that’s empty, it’ll then use $desc_generated.

    I hope this helps! Cheers ??

    Thread Starter wladi

    (@wladi)

    Большое спасибо, это то что надо. Я решил выключить вывод Open Graph, потому что хочу выводить на определённые записи тип не content=”article” , а content=”video”. Ну, а плагин не позволяет делать таких модернизаций, вот и решил вытащить все значения которые подтягивает плагин и составить заголовки Open Graph самостоятельно.

    Thank you very much, this is what you need. I decided to turn off Open Graph output, because I want to display on certain posts the type is not content = “article”, but content = “video”. Well, the plug-in does not allow such upgrades, so I decided to pull out all the values that pull the plug-in and compose the Open Graph headers on their own.

    Thread Starter wladi

    (@wladi)

    Спасибо

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘meta name=”description”’ is closed to new replies.