WordPress.org

Ready to get started?Download WordPress

Forums

Post Type Switcher
[resolved] Not Working in 3.1 (5 posts)

  1. Alok Sharma
    Member
    Posted 3 years ago #

    A wonderful plugin but this does not seems to be working in 3.1. Updating the plugin will be highly appreciated.

  2. affilisites
    Member
    Posted 3 years ago #

    second

  3. Vladimir Statsenko
    Member
    Posted 3 years ago #

    I can suggest a temporary solution of this issue.

    Add the following code to the end of
    wp-content/plugins/post-type-switcher/post-type-switcher.php
    file. Just before php closing tag (?>).

    function pts_save( $post_id, $post ) {
    	if ( isset( $_POST[ 'pts_post_type' ] ) && $_POST[ 'pts_post_type' ] != $post->post_type ) {
    		$cur_post_id = $post_id;
    		//checking if current post is a revision
    		if ( false !== ( $id = wp_is_post_revision( $post ) ) ) {
    			$cur_post_id = $id;
    		}
    		//updating post type
    		set_post_type( $cur_post_id, $_POST[ 'pts_post_type' ] );
    	}
    }
    
    add_action( 'save_post', 'pts_save', 10, 2 );
  4. kreviii
    Member
    Posted 3 years ago #

    <del>what if it isn't showing up in the menu, isn't supposed to be under "tools" I can't remember, but either way is there a trick to make it display in the menu? or a path to go that it might still be at?</del>

    Convert post types Plug-in works

  5. John James Jacoby
    BuddyPress/bbPress Lead
    Plugin Author

    Posted 3 years ago #

    Apologies. Plugin was updated but new version was never pushed out.

    Version 0.3 will fix these issues.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic