{"id":4563,"date":"2025-03-28T16:34:38","date_gmt":"2025-03-28T15:34:38","guid":{"rendered":"https:\/\/wpmastertoolkit.com\/module\/selecteur-de-type-de-publication\/"},"modified":"2025-09-30T11:05:00","modified_gmt":"2025-09-30T09:05:00","slug":"migration-de-type-de-publication","status":"publish","type":"module","link":"https:\/\/wpmastertoolkit.com\/en\/module\/post-type-switcher\/","title":{"rendered":"Publication type migration"},"content":{"rendered":"<h1 class=\"wp-block-heading\">Changing the type of WordPress content has never been easier<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">When working with WordPress, it often happens that an article has been created under the wrong content type (post type). For example, an article written as a \"publication\" when it should have been a \"portfolio\". Until now, this would have required the use of a third-party plugin or manual manipulation of the database. To simplify this common task, we have integrated the <strong>Post Type Switcher<\/strong> in <strong>WPMasterToolKit<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Which plugin can Post Type Switcher replace?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This module replaces popular plugins such as <strong>Post Type Switcher<\/strong> by John James Jacoby, while integrating more seamlessly with WordPress administration, without overloading the system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Change your post type in one click<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The module <strong>Post Type Switcher<\/strong> allows you to change the type of WordPress content (post, page, or any other custom post type) with a single click from :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>the classic editing screen<\/li>\n\n\n\n<li>block editor (Gutenberg)<\/li>\n\n\n\n<li>fast editing<\/li>\n\n\n\n<li>bulk editing<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">It adds a \"Type\" column to the list of contents, as well as a selection field for modifying the type directly without leaving the interface.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Full WordPress integration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We have taken great care to integrate this module into all administration interfaces:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Classic edition<\/strong> a new field appears in the publication box with a \"Modify\" link to safely change the content type.<figure class=\"wp-block-image size-full\"><img alt=\"WordPress post publishing menu.\" fetchpriority=\"high\" decoding=\"async\" width=\"542\" height=\"381\" src=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-4.png\" class=\"wp-image-4571\" srcset=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-4.png 542w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-4-300x211.png 300w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-4-18x12.png 18w\" sizes=\"(max-width: 542px) 100vw, 542px\" \/><\/figure><\/li>\n\n\n\n<li><strong>Fast, grouped editing<\/strong> drop-down menus are injected into native forms, with automatic synchronization after saving.\n<figure class=\"wp-block-image size-large\"><img alt=\"Quick editing of a draft WordPress page.\" decoding=\"async\" width=\"1024\" height=\"175\" src=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-1-1024x175.png\" class=\"wp-image-4568\" srcset=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-1-1024x175.png 1024w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-1-300x51.png 300w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-1-768x131.png 768w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-1-1536x262.png 1536w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-1-18x3.png 18w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-1.png 1687w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<figure class=\"wp-block-image size-full\"><img alt=\"WordPress post editing interface with multiple options.\" decoding=\"async\" width=\"988\" height=\"433\" src=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-2.png\" class=\"wp-image-4569\" srcset=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-2.png 988w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-2-300x131.png 300w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-2-768x337.png 768w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-2-18x8.png 18w\" sizes=\"(max-width: 988px) 100vw, 988px\" \/><\/figure>\n<\/li>\n\n\n\n<li><strong>Block editor (Gutenberg)<\/strong> a button in the side column displays a popup allowing you to choose another type, with a confirmation message before taking action.<figure class=\"wp-block-image size-full\"><img alt=\"Publication type options: article or page.\" loading=\"lazy\" decoding=\"async\" width=\"520\" height=\"409\" src=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-3.png\" class=\"wp-image-4570\" srcset=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-3.png 520w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-3-300x236.png 300w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/03\/image-3-15x12.png 15w\" sizes=\"(max-width: 520px) 100vw, 520px\" \/><\/figure><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How to use this module<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Simply activate the <strong>Post Type Switcher<\/strong> from the WPMasterToolKit interface. Once activated :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to the \"Articles\", \"Pages\" or any custom post type screen.<\/li>\n\n\n\n<li>In the \"Type\" column, click on \"Modify\" (in the article) or use Quick Edit.<\/li>\n\n\n\n<li>Select the desired new type.<\/li>\n\n\n\n<li>Save, and the content type will be updated.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Our technical choices<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To ensure performance and compatibility :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The module is <strong>loaded only if the user is on a relevant page<\/strong> (<code data-no-auto-translation=\"\">post.php<\/code>, <code data-no-auto-translation=\"\">edit.php<\/code> or <code data-no-auto-translation=\"\">admin-ajax.php<\/code>).<\/li>\n\n\n\n<li>The type change is <strong>protected by a secure nonce<\/strong>.<\/li>\n\n\n\n<li>A customized hook <code data-no-auto-translation=\"\">do_action( 'wpmastertoolkit\/post_type_switcher\/after_switch', $new_type, $old_type, $post_id )<\/code> allows developers to act after a type change.<\/li>\n\n\n\n<li>For multilingual sites with <strong>WPML<\/strong>the module automatically synchronizes the content type between translations to avoid desynchronization.<\/li>\n\n\n\n<li>The types of content available are filtered to exclude <code data-no-auto-translation=\"\">attachments<\/code>and propose only public types with an interface.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The module <strong>Post Type Switcher<\/strong> from <strong>WPMasterToolKit<\/strong> saves you time and effort in managing your content. No need to install an additional plugin: simply activate this module and enjoy a native, consistent and secure experience for managing your content types in WordPress.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With WPMasterToolKit, every module does exactly what it's supposed to, when it's supposed to - no more, no less.<\/p>","protected":false},"excerpt":{"rendered":"<p>The WPMasterToolKit plugin enriches the experience of WordPress users with the innovative Post Type Switcher module. This module facilitates the conversion of post types, replacing similar plugins while offering seamless integration with WordPress. By adding a \"Type\" column to the management interface, it simplifies the identification and changing of publication types. Thanks to its judicious use of WordPress filters and actions, it offers flexible customization. Lightweight and powerful, Post Type Switcher improves site administration while optimizing the user experience, becoming a valuable asset for WordPress administrators and developers.<\/p>","protected":false},"featured_media":0,"parent":0,"template":"","meta":{"_acf_changed":false,"_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"","_seopress_redirections_param":"","_seopress_redirections_type":0,"_seopress_analysis_target_kw":"","_seopress_news_disabled":"","_seopress_video_disabled":"","_seopress_video":[],"_seopress_pro_schemas_manual":[],"_seopress_pro_rich_snippets_disable_all":"","_seopress_pro_rich_snippets_disable":[],"_seopress_pro_schemas":[],"_surecart_dashboard_logo_width":"180px","_surecart_dashboard_show_logo":true,"_surecart_dashboard_navigation_orders":true,"_surecart_dashboard_navigation_invoices":true,"_surecart_dashboard_navigation_subscriptions":true,"_surecart_dashboard_navigation_downloads":true,"_surecart_dashboard_navigation_billing":true,"_surecart_dashboard_navigation_account":true},"class_list":["post-4563","module","type-module","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/module\/4563","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/module"}],"about":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/types\/module"}],"wp:attachment":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/media?parent=4563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}