Tagged: , ,

  • This topic has 9 replies, 3 voices, and was last updated 6 years ago by vayu.
Viewing 9 reply threads
  • Author
    Posts
    • #5710
      vayu
      Member

      Hi.
      I have added custom statuses to a CPT.

      'status' => array(
      	'draft' => array( 'label' => 'Kladde' ),
      	'processing' => array( 'label' => 'Afventer godkendelse' ),
      	'completed' => array( 'label' => 'Godkendt' ),
      	'rejected' => array( 'label' => 'Afvist' ),
      	'rejected_completed' => array( 'label' => 'Afvist & behandlet' )
      )

      When I create a new post and press the publish button, then it does not publish, but stays on draft. I would like for it to change state to processing.
      Another thing I don’t understand, is that it reads “Save” on the publish button, even when it is not published. How come this has changed? Can I get it to read the standard text on the button?

    • #5720
      Steve
      Keymaster

      @vayu– What version of Piklist are you using? I just tested on 0.9.9.7 and it works great.

    • #5740
      vayu
      Member

      Hi Steve.

      Okay, thanks for checking. I also am using version 0.9.9.7. So something else must be causing the problem. I am using wordpress multisite, but this should not cause the problem. I will have to go through my code and plugins.

    • #5741
      Steve
      Keymaster

      Are the Piklist Demos working? They use custom statuses.

    • #5744
      vayu
      Member

      Okay, I activated the demos. I then added a new piklist demo post. The same problem appears there. But I am confused. On this page, it says that there must be a draft status, that you can relabel. However, the demo does not use the draft status.

      Creating Custom Post Statuses


      So when I want to save new piklist demo, then the status does not change and stays on the status “New”.

      The same issue also happens on the button. The text has changed to “Save” and it does not say “Publish” like it does normally.

    • #5774
      Steve
      Keymaster

      @vayu– In the latest beta you don’t have to set the first status as “Draft”. The “Publish” status will only show up for default statuses.

    • #5786
      ndbe
      Member

      I think it’s default WordPress behavior. If you remove status with name ‘publish’ the button always changes to save and you have to set post status by hand. You can bypass this by creating post status with name publish and different label.

    • #5789
      vayu
      Member

      Thanks guys for the tips and feedback. I might change mig processing status to publish instead, so can overcome this issue. It seems that there are no ways of controlling what it says on the publish/save button, no hooks as far as I can see. Thats a shame.

    • #5793
      ndbe
      Member

      It’s not a pretty way but you can always do this with JS.

    • #5800
      vayu
      Member

      Yes, that was my thought as well, but like you say, it would be nice with a more elegant way. 🙂

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