All In One Seo Pack Shortcodes

Below, you’ll find a detailed guide on how to add the All In One Seo Pack 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 All In One Seo Pack Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the All In One Seo Pack Plugin and the shortcodes it provides:

Plugin Icon
All in One SEO – Best WordPress SEO Plugin – Easily Improve SEO Rankings & Increase Traffic

"All in One SEO is the ultimate WordPress plugin designed to optimize your website's SEO rankings. With this tool, improving your site's visibility and driving more traffic becomes a breeze."

★★★★☆ (3718) Active Installs: 3000000+ Tested with: 6.3.2 PHP Version: 7.0
Included Shortcodes:
  • [ aioseo_breadcrumbs]
  • [ aioseo_html_sitemap]

All In One Seo Pack [ aioseo_breadcrumbs ] Shortcode

The All-In-One-SEO-Pack plugin shortcode is a tool that adds the ‘aioseo_breadcrumbs’ function to your site. This shortcode displays breadcrumb navigation on your website, improving user experience and SEO. It calls the ‘display’ function, which returns the frontend display of breadcrumbs.

Shortcode: [ aioseo_breadcrumbs ]

Examples and Usage

Basic example – A basic usage of the aioseo_breadcrumbs shortcode would be to display the breadcrumb navigation on a specific page or post.

[ aioseo_breadcrumbs]

PHP Function Code

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

Shortcode line:

add_shortcode( 'aioseo_breadcrumbs', [ $this, 'display' ] );

Shortcode PHP function:

function display() {
		return aioseo()->breadcrumbs->frontend->display( false );
	}

Code file location:

all-in-one-seo-pack/all-in-one-seo-pack/app/Common/Breadcrumbs/Shortcode.php

All In One Seo Pack [ aioseo_html_sitemap] Shortcode

The All In One SEO Pack shortcode is a tool for generating HTML sitemaps. This shortcode, when added, calls the ‘render’ function. It retrieves the attributes for the HTML sitemap from the frontend and outputs it. This simplifies the process of creating a sitemap, making it more user-friendly.

Shortcode: [ aioseo_html_sitemap]

Examples and Usage

Basic example – The given shortcode allows you to render an HTML sitemap on your WordPress website. This basic usage example does not require any parameters and will display the default sitemap.

[ aioseo_html_sitemap /]

Advanced examples

Displaying a sitemap with specific attributes. You can customize the sitemap output by setting different parameters. For instance, you can choose to include or exclude certain post types or limit the number of posts displayed.

[ aioseo_html_sitemap include="post,page" exclude="category,tag" limit="10" /]

Using the shortcode to display a hierarchical sitemap. By setting the ‘hierarchical’ parameter to true, the sitemap will display posts in a hierarchical manner based on their parent-child relationships. This is particularly useful for websites with a complex structure.

[ aioseo_html_sitemap hierarchical="true" /]

Note: The ‘include’, ‘exclude’, and ‘limit’ parameters accept a comma-separated list of post types or taxonomy names. The ‘hierarchical’ parameter accepts a boolean value (true or false).

PHP Function Code

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

Shortcode line:

add_shortcode( 'aioseo_html_sitemap', [ $this, 'render' ] );

Shortcode PHP function:

function render( $attributes ) {
		$attributes = aioseo()->htmlSitemap->frontend->getAttributes( $attributes );

		return aioseo()->htmlSitemap->frontend->output( false, $attributes );
	}

Code file location:

all-in-one-seo-pack/all-in-one-seo-pack/app/Common/Sitemap/Html/Shortcode.php

Conclusion

Now that you’ve learned how to embed the All In One Seo Pack 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 *