• 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 Get value from JSON [duplicate]

Could not decode a text frame as UTF-8.

PhpSpreadSheet: How to save Workbook sheets in individual CSV files

Yii2 redirecting to previous page after login

How to put php code inside opening and closing shortcodes

How to create a individual template for page or post in custom plugin?

woocommerce change position of price

Adding the custom page with add_menu_page function on Wordpress

Can't call javascript alert alertify library from PHP

Issue with laravel eloquent model property

Merge column values from two arrays to form an indexed array of associative arrays

wp_remote_get() not passing authentication

PHP array, move keys and values to new array, but mix it up

Shortcode or PHP inside a shortcode in Wordpress

How to break out of a foreach once a condition is met?

About Contact Privacy policy Terms and conditions