• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Yoast SEO (WordPress Plugin) - Get plugin generated data manually

phpwordpressyoast


PHP Snippet 1:

echo get_post_meta(get_the_ID(), '_yoast_wpseo_metadesc', true); 
echo get_post_meta(get_the_ID(), '_yoast_wpseo_title', true); 

PHP Snippet 2:

do_action( 'wpseo_head' );

PHP Snippet 3:

echo YoastSEO()->meta->for_current_page()->description;

Related Snippets

php code to send checkbox form results to email

Hide specific products from unlogged users based in product category in WooCommerce

Using if(isset($_POST['submit'])) to not display echo when script is open is not working

Distribute array row data to make multiple new rows

Fatal error: Array callback has to contain indices 0 and 1

Adding custom body class to the custom archive pages

Star rating with half star support

How to keep value of selected value after form submission?

Backend cannot be reached after Typo3 login screen

Mysqli Output to a table

Wordpress 'post_type_link' hides permalink

Insert a DIV after the 6th product only once in WooCommerce category archives

correct PHP headers for pdf file download

how to display a view on laravel 8 and not have a 404 NOT FOUND page?

Json_Encode not returning html even i try to encode JSON_HEX_QUOT | JSON_HEX_TAG

About Contact Privacy policy Terms and conditions