0

I've multiple meta boxes for my main/default post types.

I also have multiple post_types where this meta boxes make no sense.

Can you hint me on if/else function I would use on displaying meta boxes only on default post_type?

4
  • 1
    How did you add these meta boxes? codex.wordpress.org/Function_Reference/add_meta_box Take a look at the 3rd argument
    – janw
    Commented Oct 12, 2012 at 7:23
  • @janw I have working meta box system, just need to limit it.
    – user8842
    Commented Oct 12, 2012 at 7:34
  • Which one? There must be an option to set post type.
    – Miha Rekar
    Commented Oct 12, 2012 at 7:39
  • @SandroDzneladze I understand the question, but depending on the plugin/code the means to fix may be different.
    – janw
    Commented Oct 12, 2012 at 9:16

1 Answer 1

1

If you're using add_meta_box, the 4th paramater should be what you're looking for.

add_meta_box( $id, $title, $callback, $post_type, $context, $priority, $callback_args );

Use http://codex.wordpress.org/Function_Reference/add_meta_box as a reference

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.