Custom Post Statuses Not Working Anymore – Piklist Support https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/feed/ Tue, 08 Feb 2022 19:57:43 +0000 https://bbpress.org/?v=2.6.6 en-US https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/#post-1938 <![CDATA[Custom Post Statuses Not Working Anymore]]> https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/#post-1938 Thu, 03 Jul 2014 17:54:18 +0000 zanedickens Hi All,

I was able to get my custom post statuses to work and thus all the dependant functionality fairly easily. I then did something. Now none of them are showing up and for the life of me I cannot find the issue in the CPT declaration.

Is there anything wrong with the following (it’s part of a merged array of CPTs as per example in docs):


,'company_community' => array(
      'labels' => piklist('post_type_labels', 'Community Award Entry')
      ,'supports' => array(
        'revisions',
      )
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'communityaward'
      )
     ,'edit_columns' => array(
        'title' => __('Community Award Entry')
        ,'author' => __('Entered by')
        ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
        ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
    )           
]]>
https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/#post-1940 <![CDATA[Reply To: Custom Post Statuses Not Working Anymore]]> https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/#post-1940 Thu, 03 Jul 2014 18:52:43 +0000 Steve This works for me. I see all post statuses in the meta box dropdown.

]]>
https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/#post-1943 <![CDATA[Reply To: Custom Post Statuses Not Working Anymore]]> https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/#post-1943 Fri, 04 Jul 2014 09:38:53 +0000 zanedickens Thanks Steve – at least I can hunt elsewhere now 🙂 Is the issue most likely then in my merged array or some sort of plugin conflict?

1. The posts are created and everything there works (although occasionally I have a doubling of field boxes)
2. I’ve tried disabling all but piklist and my own but no luck in isolating further

]]>
https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/#post-1944 <![CDATA[Reply To: Custom Post Statuses Not Working Anymore]]> https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/#post-1944 Fri, 04 Jul 2014 10:01:44 +0000 zanedickens Hi I’m going to post the full code now – apologies for the length. It has to be something in here, as all plugins off, changed themes etc none of that made a difference. It was working before but now not.



add_filter('piklist_post_types', 'awards_post_types');
function awards_post_types($post_types)
{
  $post_types = array_merge($post_types, array(
    'company_skills' => array(
      'labels' => piklist('post_type_labels', 'Skills Development Award Entry')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'companyskills'
      )
      ,'edit_columns' => array(
        'title' => __('Skills Development Award Entry')
        ,'author' => __('Entered by')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
      ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
    )                                               // Community Award Entry
    ,'company_community' => array(
      'labels' => piklist('post_type_labels', 'Community Award Entry')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'communityaward'
      )
     ,'edit_columns' => array(
        'title' => __('Community Award Entry')
        ,'author' => __('Entered by')
        ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
        ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
    )                                                                   // Innovation Award Entry
    ,'company_innovation' => array(
      'labels' => piklist('post_type_labels', 'World Design Capital 2014 Innovation Award Entry')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'communityinnovation'
      )
     ,'edit_columns' => array(
        'title' => __('Innovation Award Entry')
        ,'author' => __('Entered by')
        ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )         
      ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
        
     ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
    )                                               // Job Creation Award Entry
    ,'company_jobs' => array(
      'labels' => piklist('post_type_labels', 'Job Creation Award Entry')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
                            'slug' => 'communityjobs'
                            )
      ,'edit_columns' => array(
                                'title' => __('Job Creation Award Entry')
                                ,'author' => __('Entered by')
                                ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
      ,'hide_post_row_actions' => array(
                                'quick-edit'
                                ,'view'
                                ,'open-in-visual-editor'
      )
    )                                               // Best Outsourced Contact Centre Award Entry
    ,'company_outsourced' => array(
      'labels' => piklist('post_type_labels', 'Best Outsourced Contact Centre Award Entry')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'communityoutsourced'
      )
      ,'edit_columns' => array(
        'title' => __('Best Outsourced Contact Centre Award Entry')
        ,'author' => __('Entered by')
        ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
      ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
    )                                               // Best Captive Contact Centre Award Entry
    ,'company_captive' => array(
      'labels' => piklist('post_type_labels', 'Best Captive Contact Centre Award Entry')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'communitycaptive'
      )
      ,'edit_columns' => array(
        'title' => __('Best Captive Contact Centre Award Entry')
        ,'author' => __('Entered by')
        ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
      ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
    )                                               // Best External Support Services
    ,'company_external' => array(
      'labels' => piklist('post_type_labels', 'Best External Support Services')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'communityexternal'
      )
      ,'edit_columns' => array(
        'title' => __('Best External Support Services')
        ,'author' => __('Entered by')
        ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
      ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
    )                                                   // Wellness in the Workplace Award 9/9
     ,'company_support' => array(
      'labels' => piklist('post_type_labels', 'Support Services Award Entry')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'communitysupport'
      )
      ,'edit_columns' => array(
        'title' => __('Support Services Award Entry')
        ,'author' => __('Entered by')
        ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
      ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
    )                                                   // Wellness in the Workplace Award 9/9
    ,'company_wellness' => array(
      'labels' => piklist('post_type_labels', 'Wellness in the Workplace Award Entry')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'communitywellness'
      )
      ,'edit_columns' => array(
        'title' => __('Wellness in the Workplace Award Entry')
        ,'author' => __('Entered by')
        ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
      ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
    )                                               // Manager of the Year Entry 1/4
    ,'individual_manager' => array(
      'labels' => piklist('post_type_labels', 'Manager of the Year Entry')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'individual-manager'
      )
      ,'edit_columns' => array(
        'title' => __('Manager of the Year Entry')
        ,'author' => __('Entered by')
        ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
      ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
    )                                               // Supervisor / Team Leader of the Year Entry 2/4
    ,'individualsupervisor' => array(
      'labels' => piklist('post_type_labels', 'Supervisor / Team Leader of the Year Entry')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'individual-supervisor'
      )
      ,'edit_columns' => array(
        'title' => __('Supervisor / Team Leader of the Year Entry')
        ,'author' => __('Entered by')
        ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
      ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
    )                                               // Agent / Customer Service Representative Award Entry 3/4
    ,'individual_agent' => array(
      'labels' => piklist('post_type_labels', 'Agent / Customer Service Representative Award Entry')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'individual-agent'
      )
      ,'edit_columns' => array(
        'title' => __('Agent / Customer Service Representative Award Entry')
        ,'author' => __('Entered by')
        ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
      ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
    )                                               // Support Services Award Entry 4/4
    ,'individual_support' => array(
      'labels' => piklist('post_type_labels', 'Support Services Individual Award Entry')
      ,'public' => true
      ,'has_archive' => true
      ,'rewrite' => array(
        'slug' => 'individual-support'
      )
      ,'edit_columns' => array(
        'title' => __('Support Services Individual Award Entry')
        ,'author' => __('Entered by')
        ,'status' => __('Entry Status')
      )
      ,'post_states' => true
      ,'status' => array(
        'draft' => array(
          'label' => 'Completed'
          ,'public' => true
        )
        ,'locked' => array(
          'label' => 'Locked'
          ,'public' => true
        )
        ,'scored' => array(
          'label' => 'Scored'
          ,'public' => true
        )
        ,'audited' => array(
          'label' => 'Audited'
          ,'public' => true
        )
      )
      ,'hide_post_row_actions' => array(
        'quick-edit'
        ,'view'
        ,'open-in-visual-editor'
      )
    )
  ));
 
  return $post_types;
}

Thanks in advance 🙂

]]>
https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/#post-1956 <![CDATA[Reply To: Custom Post Statuses Not Working Anymore]]> https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/#post-1956 Sat, 05 Jul 2014 01:55:38 +0000 Steve @zanedickens– You seem to have found a very odd bug. Custom Post Statuses do not work unless hide_meta_box is set. You can even pass a fake meta box and it will work.

Obviously, we’ll work on a fix but for now try adding this to your post types:

,'hide_meta_box' => array(
 'notreal'
)
]]>
https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/#post-2014 <![CDATA[Reply To: Custom Post Statuses Not Working Anymore]]> https://piklist.com/support/topic/custom-post-statuses-not-working-anymorw/#post-2014 Wed, 16 Jul 2014 18:39:37 +0000 zanedickens Thanks Steve! That was driving me nuts – happy to have found a bug – that will be my first 🙂 Now if only there were badges for that kind of thing 😉

Just a note – for some reason I didn’t get an email notification of your second reply? Got the first one but not the second one. Either way thanks again.

]]>