• 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

Fetch files from next cloud storage and display in Laravel website

Accessors (Getter) & Mutators (Setter) On a Pivot Table in Laravel

"Notice: Undefined variable", "Notice: Undefined index", "Warning: Undefined array key", and "Notice: Undefined offset" using PHP

MySQL/PHP - Web Based Game -User specific inventory table or 1 giant table? Another option?

Custom post type single page not working

How to average columns of data from multiple, flat arrays?

Display specific shipping method if woocommerce product has specific acf field value

How to unlink image from folder?

protect my blog content

Why does array_map() with null as callback create an "array of arrays"?

WordPress + Nginx on non-standard port behind AWS ELB results in broken links

Laravel SQL query midnight time not showing

php curl requesting twice

How to run or debug php on Visual Studio Code (VSCode)

Shortcode or PHP inside a shortcode in Wordpress

About Contact Privacy policy Terms and conditions