Post Type Switcher
[resolved] Post types do not change (7 posts)

  1. amurderofcrows
    Posted 5 years ago #

    Post types do not change to pages using this plugin in WP 3.1

  2. graphicagenda
    Posted 5 years ago #

    Same here.

  3. rlgrobert
    Posted 5 years ago #

    +1. It seems that the functionality is still working in the plugin (i.e., When you choose a new post type in the drop down and click the "OK" button, the jQuery works correctly to update the hidden "#post_type" element.)

    However, perhaps the WP3.1 changes to /wp-admin/post.php core file (the action of the form) make it so that it no longer respects changes made to the post_type parameter. I couldn't figure out if this was the case or not, or how to fix the plugin...

    Any one else?

  4. Vladimir Statsenko
    Posted 5 years ago #

    I can suggest a temporary solution of this issue.

    Add the following code to the end of
    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 );
  5. Happeh
    Posted 5 years ago #

    Thank you so much vladimir. I really needed that plugin and it is working on the first few posts so far.

    Any idea how to make it work on the bulk edit screen?

  6. John James Jacoby
    BuddyPress/bbPress Lead
    Plugin Author

    Posted 5 years ago #

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

    Version 0.3 will fix these issues.

  7. rlgrobert
    Posted 5 years ago #

    Thanks for the update, seems to be working fine now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post Type Switcher
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic