How to Use Yoast SEO Plugin in WordPress

Yoast SEO Tutorials

Whether you love or hate Yoast SEO plugin, its popular. Although over the years its become very bloated, it still offers quick and easy use of important features such as XML functionality and ability to edit URL Title and Meta Description.

Video for Setting Up Yoast SEO WordPress Plugin

RankYa Functions for Extending Yoast for Higher Google Ranking

function rankya_get_the_title( $post = 0 ) {
$post = get_post( $post );
$title = isset( $post->post_title ) ? $post->post_title : '';
$id = isset( $post->ID ) ? $post->ID : 0;
if ( ! is_admin() ) {
if ( ! empty( $post->post_password ) ) {
$protected_title_format = apply_filters( 'protected_title_format', __( 'Protected: %s' ), $post );
$title = sprintf( $protected_title_format, $title );
} elseif ( isset( $post->post_status ) && 'private' == $post->post_status ) {
$private_title_format = apply_filters( 'private_title_format', __( 'Private: %s' ), $post );
$title = sprintf( $private_title_format, $title );
}
}
return apply_filters( 'the_title', $title, $id );
}
function rankyaseomastery(){
$rankyaposttitle = rankya_get_the_title();
$rankyaposttitle = '<h2>'.$rankyaposttitle.'</h2>';
$rankyacustomkeywords = "<p style='margin-left:.85em;margin-right:.85em;'>Thank you for sharing this blog post. Description: ". get_post_meta(get_the_ID(), '_yoast_wpseo_metadesc', true) ."</p>";
return $rankyaposttitle . $rankyacustomkeywords;
}
add_shortcode('insertrankyaseomastery','rankyaseomastery');

SEO Tutorial by RankYa – Includes How to Use Yoast SEO Function

SEO Lessons for Beginners

What Does the Above Codes Do?

It allows you to show Yoast SEO Title & Meta Description on the frontend (giving your website higher precision of keyword targeting).

Where does the above code go? You can backup your Theme functions.php file and place it anywhere in functions.php

Then use the WordPress shortcode to insert meta description (perhaps footer or sidebar) by simply using WordPress shortcode using this format [insertrankyaseomastery]

By RankYa

RankYa digital marketer, website optimizer, content creator, and a fully qualified web developer helping businesses of all sizes achieve greater results online. Based in Melbourne Australia RankYa serves valued clients worldwide by providing personalized services.

We love sharing our proven experience through how to videos and complete courses related to business website marketing, conversion optimization, Google (Search Console, Ads, Analytics, YouTube), SEO, HTML5, Structured Data and WordPress. Thank you for visiting our blog.

1 comment

Questions? Leave a Comment!

Your email address will not be published. Required fields are marked *