Skip to main content
2 of 2
deleted 61 characters in body

I scraped the WordPress source code to find this solution that is in pure PHP and has been available since WordPress 4.4.

You can use the action "manage_posts_extra_tablenav" to insert whatever you want before and after the table.

https://developer.wordpress.org/reference/hooks/manage_posts_extra_tablenav/

This is an example:

add_action('manage_posts_extra_tablenav', function($which) {
    if (get_current_screen()->post_type !== 'ticket'){
        return;
    }
    echo '<div class="actions alignleft"><button>Custom button</button></div>';
});

enter image description here