开发者

Wordpress create a new post status? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 3 years ago.

Improve this questi开发者_开发问答on

In Wordpress you get the default post statuses: Published, Draft and Pending Review. Is it possible to add some more post types via registering them via the function.php file of the active theme?

Also is it possible to edit the lables of the Publish Meta Box? What I'm submitting really isnt Publishing...

Also like to add I only want these changes made when in my custom post type I've made.

Kind Regards

Scott


Since WP 3.0, you can use the register_post_status() function ( http://hitchhackerguide.com/2011/02/12/register_post_status/ ) to add new statuses to a post type.

WP itself uses register_post_status() to register the default "published", "draft", etc. statuses on init using the create_initial_post_types() function in wp-includes/post.php ( http://hitchhackerguide.com/2011/02/11/create_initial_post_types/ ).

Look at the code in those links, and you can get an idea of how to use the function.

I hope that helps you get started!


You could write a plugin if you know how. You have to dig into the documentation or similar plugins like this one http://wordpress.org/extend/plugins/edit-flow/ or this one http://wordpress.org/extend/plugins/custom-post-type-ui/

With "Hooks, Actions and Filters" you can change the admin interface, see here http://codex.wordpress.org/Plugin_API

So far I've write just one simple plugin and I don't know the exact steps you have to follow to accomplish this...

Good luck!


You can add custom post status' using the register_post_status function. Refer to create_initial_post_types() in http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/post.php

Be warned however, that this is not integrated into the Wordpress backend UI.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜