How can I filter my custom post type like it’s filtered by WordPress itself? By that I mean the links that allow you to show only published, private or trashed posts.
I need it because I want to filter my event post type in a way that you’ll only see upcoming events at first, being still able to see all events.
I came across this question but it would be a dropdown instead of these links.
[edit]
So what I want is to have a link Past events
next to the Published
link instead of using the standard dropdown menus.
[edit2]
I eventually did use a dropdown, based on this answer: https://wordpress.stackexchange.com/a/45447/28916
I would suggest using
post_submitbox_misc_actions
action as shown in the below example to provide an option for Publish meta-box.Once used for at-least one post( or a CPT), then those options should appear beside publish actions in all posts admin page.