• 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

I'm trying to write a clean url for my website using the $_SERVER['REQUEST_URI'] in php

Read users and passwords from a txt file

Add bold text and line break into Laravel Notification Email

Display the default discounted price and percentage on Woocommerce products

Change the alert text on add to cart action without selected variation in Woocommerce

How to debug in WooCommerce 3+

PHPExcel file download using AJAX call

Statement that checks whether a URL contains a particular path?

Get data from accuweather api url

Access denied for user 'homestead'@'localhost' (using password: YES)

Can't find vendor/autoload.php for Ratchet

How to override htaccees file for cache control header

Required field only if another field has a value, must be empty otherwise

No definition found for function in vendor vscode

How to read laravel_session cookies saved in cookie memory of browser in client side?

About Contact Privacy policy Terms and conditions