WordPress.org

Ready to get started?Download WordPress

Forums

Post Type Switcher
Custom post types 'Magic Action Box' (7 posts)

  1. Martin
    Member
    Posted 2 years ago #

    I've used this plugin before and needed to delete it due to it interfering so much with Custom Post Types.

    It comes to light especially now as I am using the plugin 'Magic Action Box' - http://wordpress.org/extend/plugins/magic-action-box/

    In creating a new custom box, I found that when Post Type Switcher is installed, other content is treated as a Post, publishes out to my RSS Feed and generally corrupts the Custom Post Type function.

    I installed this latest version and this behaviour is still evident.
    I've got no idea what "Filter 'pts_post_type_filter' to adjust the boundaries." actually means either.

    Since the plugin has no UI, I'm presuming this means that people need to go in and hack this plugin's PHP code - is that right?

    http://wordpress.org/extend/plugins/post-type-switcher/

  2. John James Jacoby
    BuddyPress/bbPress Lead
    Plugin Author

    Posted 1 year ago #

    Never hack the plugin code. The filter is there for other plugin developers to opt into making their plugins work with Post Type Switcher without needing to modify its code.

  3. Martin
    Member
    Posted 1 year ago #

    So you're saying other plugin developers need to be aware that your plugin exists and make theirs compatible, otherwise your plugin messes with their post type?
    Kinda doesn't make that much sense to me - I'd have preferred some other paradigm in this plugin because so far it's messed up a number of different content types.

    Great idea, though I'm not so sure the execution seems right, for me and the content types I have at least.

  4. Ryann Micua
    Member
    Posted 1 year ago #

    hmmmm.. looks like post-type-switcher only retrieves custom post types that is set to "public" and "show_ui" - where magic action box "public" is set to false.

    just curious though, @Rastarr how are you using post type switcher? seems to me that this plugin is more like a utility tool that only needs to be used once in a while, like when you need to "convert" a content type from one post type to another i.e. page->post

  5. John James Jacoby
    BuddyPress/bbPress Lead
    Plugin Author

    Posted 1 year ago #

    Ryann is correct. Post Type Switcher isn't really intended to be something to keep active, since you should rarely ever need to switch types around.

    If there is a specific use-case, and specific duplication steps can be provided, I'll look into trying to support some other post type configurations.

  6. Ryann Micua
    Member
    Posted 1 year ago #

    Hey John, Post type switcher isn't picking up Magic Action Box's post types because MAB post type is set to

    "public => false" but "show_ui => true"

  7. GaryPaulson
    Member
    Posted 1 year ago #

    I found this solution, may just have to replace 'acf' with 'MAB' or add it along with 'acf'

    http://wordpress.org/support/topic/post-type-switcher-bug-with-advanced-custom-fields?post-2821135

    Code added to my child-theme's functions.php:

    /* Post Type Switcher (PTS) & Advanced Custom Fields (ACF)
     * Keep PTS from messing with the ACF post type when editing the ACF pages.
     * Source: marcosf on http://wordpress.org/support/topic/post-type-switcher-bug-with-advanced-custom-fields#post-2821135
    */
    
    add_filter( 'pts_post_type_filter', "pts_disable");
    function pts_disable( $args ) {
        $postType  = get_post_type();
        if( 'acf' === $postType ){
            $args = array(
              'name' => 'acf'
            );
        }
        return $args;
    }
    /* End PTS & ACF */

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic