• 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

Limit login attempts in Laravel 5.7

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

How to add class name to an existing tag in php

how do i retrieve and display the alt text of an image in wordpress?

Composer Curl error 60: SSL certificate problem: unable to get local issuer certificate

AJAX call fails with SyntaxError: Unexpected end of JSON input

Make survey at laravel 5.4 and MySQL

Assets not referencing to public folder (Laravel)

Auto increment id JSON

Show only featured products in Woocommerce shop page

Can I use a WooCommerce function without any WooCommerce page?

How to set dynamic `home` and `siteurl` in WordPress?

Nginx disallowing execution of PHP in uploads directory with Magento

SQLSTATE[HY000]: General error: 1 table posts has no column named *

PHP: Insert marker every 3 iterations

About Contact Privacy policy Terms and conditions