Tagged: custom post type labels, custom status
- This topic has 4 replies, 2 voices, and was last updated 8 years, 10 months ago by
Steve.
-
AuthorPosts
-
-
March 22, 2013 at 3:38 pm #728
johnmcalesterMemberHi There,
I have been trying to get custom status’ to work on my CPTs for a while and I simply cannot get them to appear in the status drop down on the edit “post” page. I have tried getting custom status’ to work on different WP installs so I’m pretty sure it’s not a plugin conflict.
Here is a Pastebin of the CPT code that I am using:
I feel like there is a setting or something that I am not getting.
-
March 23, 2013 at 1:43 pm #729
johnmcalesterMemberOK, I figured out what my problem was.
I didn’t realise that it was possible to set custom labels for a CPT registered with PikList so I was using a custom array like so:
function report_post_type($post_types) {
$labels = array(
‘name’ => (‘some-label’),
);$post_types[‘report’] = array(
‘labels’ => $labelsThen I realized that you could set custom labels a-la this thread:
http://piklist.com/support/reply/reply-to-setting-labels-on-new-type/
So once I set the labels using the ‘labels’ array within the $post-types array then I could set custom post status’
-
March 26, 2013 at 10:55 am #730
SteveKeymaster@johnmcalester– Just to be clear, you don’t need to setup individual labels for Post Statuses to work. Check out the demo add-on with Piklist… no custom labels.
My guess is that the array was setup wrong, so Post Statuses didn’t render.
Either way, glad they are working now.
-
April 3, 2013 at 12:20 pm #742
johnmcalesterMember@steve – Thanks. I’m still having a little trouble with custom status. If I have PikList Demos enabled I can set custom status and they show up in the publish metabox on edit pages. However, if I disable PikList Demos the custom status disappear on my CPTs.
Can you think of any reason for this? I can send code if you need.
Thanks!
-
April 3, 2013 at 2:03 pm #743
SteveKeymaster@johnmcalester– Did you copy and paste code from Piklist Demos when you registered CPT’s? Make sure you’re not calling Demo functions or hooks.
Feel free to post some code, and we can take a look.
-
-
AuthorPosts
- You must be logged in to reply to this topic.