API

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 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, meta

Remove SEO News Dashboard Widget

If you’d like to remove the SEO News widget from the Dashboard of all administrators, use the following code in your functions.php: add_filter( ‘aioseo_show_seo_news’, ‘__return_false’ );

Filter SEO columns from edit post screen

If you would like to remove the SEO Title/Description columns from the edit post screen, you can do so by adding the following code to your functions.php add_action( ‘admin_head’,’remove_aiocolumns’ ); function remove_aiocolumns(){ remove_filter(‘manage_posts_columns’,’aioseop_mrt_pcolumns’); remove_filter(‘manage_pages_columns’,’aioseop_mrt_pcolumns’); remove_filter(‘manage_media_columns’,’aioseop_mrt_pcolumns’); }

Remove All in One SEO Pack from top of menu

All in One SEO Pack automatically displays near the top of the menu in your WordPress dashboard. If for some reason you’d like to disable this functionality, you can do so with our filter hook, aioseo_custom_menu_order. add_filter( ‘aioseo_custom_menu_order’, ‘__return_false’ );

Skip to toolbar