• 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

Upload a file Using PHP and JavaScript

PHP if in_array() how to get the key as well?

Failed user login on production server using Symfony framework (Authentication request could not be processed due to...)

Laravel Model save() & update() Not Saving

PHP usort() order in case of equality

Using array_intersect on a multi-dimensional array

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

How to loop sql table data inside a html table

How to install php yaml on CentOs?

How do I loop through an MS SQL database with VB.NET?

Display the WooCommerce product price inside a custom function

PHP - Store information with NO database

How to fix " Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() " problem in php 7.1.3 and jpgraph 4.2.6?

PHP: PDO + CSV export not downloading (headers issue?)

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

About Contact Privacy policy Terms and conditions