Praison SEO WordPress Shortcodes

Below, you’ll find a detailed guide on how to add the Praison SEO WordPress Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Praison SEO WordPress Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the Praison SEO WordPress Plugin and the shortcodes it provides:

Plugin Icon
Praison SEO WordPress

"Praison SEO WordPress is a powerful plugin designed to enhance your site's SEO. It optimizes your content, improves website visibility and boosts your search engine rankings."

★★★☆✩ (6) Active Installs: 3000+ Tested with: 6.0.6 PHP Version: false
Included Shortcodes:
  • [seo_google_authorship_badge]
  • [seo_google_authorship_icon]
  • [seo_google_authorship]

Praison SEO WordPress [seo_google_authorship_badge] Shortcode

The ‘seo_google_authorship_badge’ shortcode retrieves and displays the author’s Google Plus profile. It fetches the author’s name and URL from the WordPress user meta data. If the author’s preferred name is not available, it uses the display name instead. The shortcode then creates a Google Plus badge linked to the author’s profile.

Shortcode: [seo_google_authorship_badge]

Examples and Usage

Basic example – This shortcode displays the Google authorship badge of the current post’s author.

[seo_google_authorship_badge /]

Advanced examples

Using the shortcode to display the Google authorship badge of a specific author by referencing the author’s ID. This can be useful when you want to highlight a specific author on a page, regardless of who wrote the current post.

[seo_google_authorship_badge author_id=2 /]

Using the shortcode to display the Google authorship badge of a specific author by referencing the author’s username. This can be useful when you want to highlight a specific author on a page, and you know their username but not their ID.

[seo_google_authorship_badge author_username="john_doe" /]

Please note that the above examples assume that the ‘seo_google_authorship_badge’ shortcode has been modified to accept ‘author_id’ or ‘author_username’ parameters. The provided PHP function does not currently support these parameters. To implement this functionality, you would need to modify the function to accept and use these parameters when determining which author’s badge to display.

PHP Function Code

In case you have difficulties debugging what causing issues with [seo_google_authorship_badge] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'seo_google_authorship_badge', 'seo_authorship_badge_short' );

Shortcode PHP function:

function seo_authorship_badge_short () { 

$mpgp_author_name = esc_attr( get_the_author_meta( 'zeopreferredname', $user->ID ) );
$mpgp_author_display = esc_attr( get_the_author_meta( 'display_name', $user->ID ) );
$mpgp_author_url = esc_attr( get_the_author_meta( 'zeoauthor', $user->ID ) );
if($mpgp_author_url!=NULL){
	
if($mpgp_author_name==NULL) 
					{
						$authorizing = $mpgp_author_display;
					}
					else{
						
					$authorizing = $mpgp_author_name;
					
					}

				$mpgpreturn = "<g:plus href='";
				$mpgpreturn .= $mpgp_author_url;
				$mpgpreturn .= "' rel='";
				if(is_author){ $mpgpreturn .="author";}
				else {$mpgpreturn .= "me";}
				$mpgpreturn .= "' width='170' height='69' title='Google Plus Profile for ";
				$mpgpreturn .= $authorizing; 
				$mpgpreturn .="'>";
				$mpgpreturn .= "</g:plus>";
}

		return $mpgpreturn;
}

Code file location:

seo-wordpress/seo-wordpress/seo-authorship-badge.php

Praison SEO WordPress [seo_google_authorship_icon] Shortcode

The ‘SEO Google Authorship Icon’ shortcode integrates Google’s authorship feature into your WordPress site. It retrieves the author’s preferred name, display name, and author URL from their profile. If an author URL exists, it creates a hyperlink to the author’s Google Plus profile with an icon. This boosts SEO by linking content to its author.

Shortcode: [seo_google_authorship_icon]

Examples and Usage

Basic example – Utilizing the SEO Google Authorship Icon shortcode to display the author’s Google Plus profile icon.

[seo_google_authorship_icon /]

PHP Function Code

In case you have difficulties debugging what causing issues with [seo_google_authorship_icon] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'seo_google_authorship_icon', 'seo_authorship_icon_short' );

Shortcode PHP function:

function seo_authorship_icon_short () { 




$mpgp_author_name = esc_attr( get_the_author_meta( 'zeopreferredname', $user->ID ) );
$mpgp_author_display = esc_attr( get_the_author_meta( 'display_name', $user->ID ) );
$mpgp_author_url = esc_attr( get_the_author_meta( 'zeoauthor', $user->ID ) );
if($mpgp_author_url!=NULL){

if($mpgp_author_name==NULL) 
					{
						$authorizing = $mpgp_author_display;
					}
					else{
						
					$authorizing = $mpgp_author_name;
					
					}

				$mpgpreturn = "<a href='";
				$mpgpreturn .= $mpgp_author_url;
				$mpgpreturn .= "?prsrc=3' rel='";
				if(is_author){ $mpgpreturn .="author";}
				else {$mpgpreturn .= "me";}
				$mpgpreturn .= "' style='text-decoration:none;' title='Google Plus Profile for ";
				$mpgpreturn .= $authorizing; 
				$mpgpreturn .="'><img src='https://ssl.gstatic.com/images/icons/gplus-32.png' alt='' style='border:0;width:32px;height:32px;'/>";
				$mpgpreturn .= "</a>";
}

		return $mpgpreturn;
}

Code file location:

seo-wordpress/seo-wordpress/seo-authorship-icon.php

Praison SEO WordPress [seo_google_authorship] Shortcode

The ‘SEO Google Authorship’ shortcode retrieves and displays the author’s name and Google Plus profile link. This shortcode fetches the author’s preferred name, display name, and Google Plus URL from the user meta. If the author’s preferred name is unavailable, it uses the display name. The Google Plus URL is then embedded into a hyperlink, labeled with the author’s name. If the page is an author page, the rel attribute is set to ‘author’, otherwise, it’s set to ‘me’. The hyperlink also includes a title attribute for the Google Plus profile.

Shortcode: [seo_google_authorship]

Examples and Usage

Basic example – Utilizing the SEO WordPress Plugin Shortcode to Display the Google Plus Profile of the Author

[seo_google_authorship /]

This shortcode, when added to a post or page, will generate a link to the Google Plus profile of the author. The link will display the author’s preferred name if it is available, otherwise, it will display the author’s display name.

Advanced examples

Using the shortcode to display the Google Plus Profile of the author with specific parameters for the author’s preferred name and display name.

[seo_google_authorship zeopreferredname="John Doe" display_name="john_doe" /]

In this advanced example, the shortcode is used with two parameters: ‘zeopreferredname’ and ‘display_name’. The ‘zeopreferredname’ parameter is used to specify the author’s preferred name, and the ‘display_name’ parameter is used to specify the author’s display name. If the preferred name is not available, the display name will be used.

Using the shortcode to display the Google Plus Profile of the author with a specific URL for the author’s profile.

[seo_google_authorship zeoauthor="https://plus.google.com/+JohnDoe" /]

In this example, the ‘zeoauthor’ parameter is used to specify the URL of the author’s Google Plus profile. When the shortcode is added to a post or page, it will generate a link to the specified Google Plus profile.

PHP Function Code

In case you have difficulties debugging what causing issues with [seo_google_authorship] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'seo_google_authorship', 'seo_authorship_short' );

Shortcode PHP function:

function seo_authorship_short () { 
$mpgp_author_name = esc_attr( get_the_author_meta( 'zeopreferredname', $user->ID ) );
$mpgp_author_display = esc_attr( get_the_author_meta( 'display_name', $user->ID ) );
$mpgp_author_url = esc_attr( get_the_author_meta( 'zeoauthor', $user->ID ) );
if($mpgp_author_url!=NULL){

if($mpgp_author_name==NULL) 
					{
						$authorizing = $mpgp_author_display;
					}
					else{
						
					$authorizing = $mpgp_author_name;
					
					}

				$mpgpreturn = "<a href='";
				$mpgpreturn .= $mpgp_author_url;
				$mpgpreturn .= "?rel=author' rel='";
				if(is_author){ $mpgpreturn .="author";}
				else {$mpgpreturn .= "me";}
				$mpgpreturn .= "' title='Google Plus Profile for ";
				$mpgpreturn .= $authorizing; 
				$mpgpreturn .="'>";					
				$mpgpreturn .= $authorizing;
				$mpgpreturn .= "</a>";
}

		return $mpgpreturn;
}

Code file location:

seo-wordpress/seo-wordpress/seo-authorship.php

Conclusion

Now that you’ve learned how to embed the Praison SEO WordPress Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

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