Solution for custom post types
-
Hi, I just wanted to share an idea how one can use this great plugin for other custom post types (other than pages):
With the plugin installed and activated, one can use the following code snippet to setup tabs for custom post types, without having to modify some file templates, you just have to modify a single array and you’re done.
Here’s an example for the post and news post types:
add_action( 'load-post.php', 'wpse_143674_init' ); function wpse_143674_init() { //-------------------------------- // EDIT this setup to your needs: // $args = array( 'post' => array( 'Bottom', 'Center', 'Top' ), 'news' => array( 'Left', 'Right' ), ); //------------------------------- $m = new WPSE_Multi_Edit_CPT( $args ); $m->init(); }
where you can get the
WPSE_Multi_Edit_CPT
class from here:https://wordpress.stackexchange.com/a/143688/26350
Best regards.
- The topic ‘Solution for custom post types’ is closed to new replies.