0

I would like to create a custom post type, but all the tutorials I've found are geared towards making a brand new one and creating meta boxes from scratch. Whereas all I would like to do is copy an existing and add one or two extra entities.

I would like to go through the motions of creating a new post type because it'll show up in the admin menu as a separate entity as you would expect, but I would like this custom post type to use pretty much all of the meta boxes associated with a normal 'post' type, plus one or two more I'd add.

How could I duplicate the post type for 'post'? How could I go about making these adjustments?

1
  • then why not just add the extra metaboxes to the built in post type?
    – Bainternet
    Nov 11, 2011 at 11:08

2 Answers 2

1

If you created a new post type, it would behave like a post unless specified.

The problem you have is that the 'post' post type is built in. I suspect you want the other post type to simply be another type of post, and show up in the archives etc etc This isn't possible with a custom post type, and the Wordpress developers have stated in the past, if you want that sort of behaviour, just use posts, custom post types were not added for that purpose.

Instead it sounds more like custom post formats is a better choice for you. You can add your own post format, and add UIs for the different formats. Alex King built such a UI that shows different things depending on the different kind of format the post is:

http://alexking.org/blog/2011/10/25/wordpress-post-formats-admin-ui

But I'm afraid without further information about your context and why you asked this question, a satisfactory answer is not possible.

0

You don't duplicate custom post types. Way to go about this will be to create your custom post type & make plugins that add additional metaboxes to posts, add metaboxes to your custom post type too. And ofcourse you can add metaboxes to your custom post type alone.

Look into how meta boxes are created, and you will see it clear that its about providing support for a post type. Plugins provide support for default post types, some support custom post types too & those who don't you can make them to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.