SEO - API

How to remove rel=’next’ and rel=’prev’ from paginated content

All in One SEO Pack adds rel=’prev’ and rel=’next’ to paginated content and archives, similar to how WordPress core adds it to single posts to link to adjacent posts. You can change these URLs, or remove them completely using the

Disable Meta Description on AMP pages

By default, All in One SEO Pack outputs the meta description on AMP pages. You can remove this meta description using the filter below: add_filter( ‘aioseop_amp_description’, ‘__return_false’ ); Filter added in All in One SEO Pack v2.3.12.1 and All in One SEO Pack Pro

Disable Open Graph meta on AMP pages

By default, All in One SEO Pack outputs Open Graph meta on AMP pages. You can remove this meta using the filter below: add_filter( ‘aioseop_enable_amp_social_meta’, ‘__return_false’ ); Filter added in All in One SEO Pack v2.3.12.1 and All in One SEO Pack Pro

Noindex Password Protected Posts

In some cases, you may want to noindex password protected posts and pages in All in One SEO Pack. You can use our handy filter aiosp_noindex_password_posts. Simply return true and all password protected posts will be noindex, follow.   Example Usage

Disable removal of Twitter meta from official Twitter plugin

By default, we remove the Twitter meta output by the official Twitter plugin when the Social Meta Module in All in One SEO Pack is active. This is to ensure there’s no duplicate Twitter meta being output to the site.

Password Protected Posts in XML Sitemaps

In order to remove password protected posts from your XML Sitemap in All in One SEO Pack, use the following API filter hook. add_filter(‘aioseop_sitemap_include_password_posts’, ‘__return_false’);

Remove Canonical URL on a Page

If you need to disable All in One SEO Pack’s canonical URL functionality on a particular page, you can use the aioseop_canonical_url filter hook. This filter hook accepts one parameter, which is the original URL. Use some sort of logic

Filter XML Sitemap Data

Filtering the XML Sitemap Data for All in One SEO Pack can be done with the aiosp_sitemap_data hook. This hook can accept four arguments; $sitemap_data, $type, $page, and $options. $sitemap_data is an array of all URLs in your sitemap and accompanying data. $type

Filter to change canonical URL protocol

To change the protocol used for canonical URLs output by All in One SEO Pack, use the following code (return either http or https): add_filter(‘aioseop_canonical_protocol’, ‘change_canonical_url_protocol’); function change_canonical_url_protocol(){ return ‘http’; }

Filter to Disable All in One SEO Pack

If you would like to disable All in One SEO Pack on certain parts of your WordPress site, you can do so with the aiosp_disable API filter hook. This will disable All in One SEO Pack’s document title, meta description,

[i]
[i]
Skip to toolbar