To satisfy a site migration from another platform, we have implemented custom statuses using the standard `register_post_status()' approach.

$args = array(
    'label'                     => _x( 'Key Sector', 'Status General Name', 'mydomain' ),
    'label_count'               => _n_noop( 'Key Sector (%s)',  'Key Sector (%s)', 'mydomain' ),
    'public'                    => true,
    'show_in_admin_all_list'    => true,
    'show_in_admin_status_list' => true,
    'exclude_from_search'       => false,
register_post_status( 'keysector', $args );

What seems to be happening though is that for custom statuses, the permalink doesn't resolve to the generated permalink of its brethren 'publish' status posts.


publish: http://mydomain.localhost/en/sectors/agriculture-and-food/

keysector: http://mydomain.localhost/en?p=31328&post_type=sectors&preview_id=31328

  • I would note that custom statuses aren't fully fleshed out, the Edit Flow plugin fills in a lot of the gaps core leaves behind – Tom J Nowell May 8 '18 at 22:04
  • I had to get rid of Edit Flow because you can't set the status to show publically. For our purposes, we might have to go 301 redirect. :( – vars May 9 '18 at 16:34
  • 1
    I envisage any answer for this will involve a filter on the permalinks, assuming rewrite rules don't work if you know what they should be – Tom J Nowell May 9 '18 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.