Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress create a new post status? [closed]

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

like image 812
Scott Avatar asked Oct 21 '10 16:10

Scott


People also ask

How do you add a new status to a post?

Adding a Custom Post Status With Edit FlowClick on the “Edit Statuses” button in the Custom Statuses box. Here you can add as many custom post statuses as you want. On the right-hand side, you will see a list of the current ones. You will notice that three new post statuses are there.

What method can be used to create a custom post status in WordPress?

You can use a plugin like CPT UI or Pods to add your own custom post types. Or you can write your own plugin and use the register_post_type() function to register the post type using code. Whichever method you use, you'll be able to get much more from your WordPress site.

Why isn't my post showing up on WordPress?

Summary. Most of the time, problems related to WordPress changes not showing on your site have to do with caching issues (browser caching, page caching, or CDN caching). The fix is to clear the cache causing these issues, making sure both you and your visitors are seeing the most recent version of your site.

What does private visibility mean in WordPress?

A WordPress private page and posts are not visible to the public. In other words, visitors can't see the content even if they know the URL. It is only available for authorized users who are logged in to the Dashboard. This might seem contradictory to WordPress' core function – content publication.


1 Answers

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!

like image 56
Vidal Quevedo Avatar answered Oct 14 '22 16:10

Vidal Quevedo