WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Wordpress site using custom post types, and I have also got the All In One SEO pack installed.

I wondered if anyone knows a hack or a modification I can make to the code which will allow me to stop the pictured area from showing up on certain custom post types?

enter image description here

Any help much appreciated.

share|improve this question

closed as off-topic by kaiser Sep 28 '14 at 19:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 5 down vote accepted

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 the CPT. Repeat the call to remove_meta_box(); for each post type you want to target. If it's a fairly high number, you could wrap it in a loop:

function wpse_55088_remove_aiosp() {
    $cpts = array( 'movie', 'album', 'clip', 'trailer' );

    foreach( $cpts as $cpt ) {
        remove_meta_box( 'aiosp', $cpt, 'advanced' );
add_action( 'add_meta_boxes', 'wpse_55088_remove_aiosp' );

It might sound a bit confusing, that I suggest hooking the function with the 'add_meta_boxes' action when you want to remove one, but this action runs after all meta boxes have been added, hence that's when existing ones can be removed. If you ran the function too early, the box would get added afterwards.

share|improve this answer
Genius! This worked an absolute treat. Thank you very much! :) – Adam Moss Jun 13 '12 at 14:02

Looks like it's just a matter of configuring the plugin...

enter image description here

share|improve this answer
I've tried this but for some reason it won't work - didn't know if there's perhaps a bug in my version. Do you know which function looks at this data? – Adam Moss Jun 13 '12 at 13:37
@AdamMoss - Nope... it works for me with AIOSP Version but Johannes solution works quite well. – brasofilo Jun 13 '12 at 13:44
You're right I think this is supposed to work, but my version must have something wrong. I've used Johannes solution – Adam Moss Jun 13 '12 at 14:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.