Viewing 4 reply threads
  • Author
    Posts
    • #728

      Hi 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:

      http://pastebin.com/mrAGBJv5

      I feel like there is a setting or something that I am not getting.

    • #729

      OK, 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’ => $labels

      Then 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’

    • #730
      Steve
      Keymaster

      @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.

    • #742

      @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!

    • #743
      Steve
      Keymaster

      @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.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.