Remove All in One Pack from the admin bar

You are almost there! If you check out where the plugin developer is adding this action, you’ll see they are setting a priority of 1000. While the priority of your function is being called at 999. https://plugins.trac.wordpress.org/browser/all-in-one-seo-pack/trunk/aioseop_class.php#L3907 Update your priority to be greater than 1000: add_action( ‘admin_bar_menu’, ‘aldous_remove_items_from_admin_bar’, 1200 ); Overriding function calls with plugins … Read more

add the post as canonical for attachment page wordpress

Here’s an (untested) example where we inject into the header tag on attachment’s pages, the canonical link of the attached post: add_action( ‘wp_head’, ‘wpse_attachment_parent_canonical’ ); function wpse_attachment_parent_canonical() { // Only target attachment’s pages if( ! is_attachment() ) return; $object = get_queried_object(); // Make sure we’re dealing with a WP_Post object if ( ! is_a( $object, … Read more

How to remove duplicate blog title

I normally use WP SEO by Yoast, but here’s a troubleshoot: what if you use only wp_title(”); (this is a WPSEO requirement) what do you have as Home Title at the plugin’s settings page? search your theme’s functions.php for a similar hook, and disable if found: add_filter( ‘wp_title’, ‘twentyten_filter_wp_title’, 10, 2 ); dig into WordPress … Read more

Adding Plugin-specific Fields with wp_insert_post()?

@sorich87’s answer is 99% there. The difference is that All-in-One SEO Pack follows certain best practices and uses a prefix of ‘_aioseop_’ on its meta keys. That makes the actual working code look more like this: $my_post = array( ‘post_title’ => ‘title’, ‘post_content’ => $post, ‘post_status’ => ‘publish’, ‘post_author’ => 1, ‘post_date’ => date(‘Y-m-d H:i:s’, … Read more

Disable All In One SEO Pack for some custom post types [closed]

If you’re satisfied with disabling the SEO-Pack on all CPTs, go with brasoflo’s answer. Should you want to keep the metabox for some CPTs and disable it only for a select few: function wpse_55088_remove_aiosp() { remove_meta_box( ‘aiosp’, ‘movie’, ‘advanced’ ); } add_action( ‘add_meta_boxes’, ‘wpse_55088_remove_aiosp’ ); Where ‘movie’ is, going with brasoflo’s answer, the name of … Read more

Is the SEO plugin necessary?

The main purpose of SEO plugin is to give you more control over SEO-related factors (titles, excerpts, meta tags and so on). It doesn’t do anything magical, just an editor to let you fine-tune beyond native WP capabilities. So necessity equals if and how much of those aspects you are willing to spend time on. … Read more