• 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

Laravel - How to properly generate unique slugs from article titles?

Composer Warning: openssl extension is missing. How to enable in WAMP

Attempted to call an undefined method named "get" of class "MailController"

How to get page number on dompdf PDF when using "view"

PHP Print to Network Printer

Laravel Database Strict Mode

How can I get a div content in php

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

Symfony 4: how to allow dynamic values for array nodes in bundle configuration?

Laravel display validation error

How to modify CSS in a specific page of the WP admin dashboard (backend)

How do I Post to .txt document before form submits

PHP/HTML: Creating A SubMenu

How to get unique slug to same post-title for other time too?

Distribute array row data to make multiple new rows

About Contact Privacy policy Terms and conditions