• 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

Uncaught TypeError: Cannot read property 'length' of null when retrieving tags from wp

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

how to fix Service provider class not found when using repository?

How to get monthly wise data in laravel

Require a class from another class - php

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

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

Cannot connect to own websocket server when on secured domain

How to render html from a @foreach loop in a textarea

Trying to iterate over a mongodb cursor twice - failing

How to get multiple values with same key from an array PHP

The sum of the user's points

Laravel php artisan serve to mimic HTTPS

auth pages not getting css in laravel

Refresh specific HTML content that retrieves data from MySQL

About Contact Privacy policy Terms and conditions