• Resolved catonezillion

    (@catonezillion)


    Hi,

    I like this plugin!

    I’m trying to set this up for multiple post types; “posts” and “custom type”
    Instead of: if($post_type==’post’){
    I tried:
    if ( is_post_type( array( ‘post’, ‘custom_type’ ) ) ) {
    and I also tried:
    if($post_type==’post’)
    if($post_type==’custom_type’){
    but neither worked.

    Any other suggestions?

    Thanks,

    Cathy

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Josh Hartman

    (@joshhartman)

    You can do that with:
    if(in_array($post_type, array('post', 'custom_type'))){

    Realize that if your custom post type’s taxonomy is not the standard “category” it won’t work and you won’t be able to save the post.

    If I wrote a filter for people to hook into and modified to code to support it then the plugin could support custom post types with custom taxonomies.

    Thread Starter catonezillion

    (@catonezillion)

    Thanks for the info! I’m not sure about taxonomy so we’ll see how it goes.

    Cathy

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Post Types revisited- multiple types’ is closed to new replies.