Adding Custom taxonomies to Press This panel

I assume you’re talking about Custom Post Type, not Custom Taxonomy. Right?

If yes, add this code on your functions.php file:

function press_this_ptype($link) {
    $post_type="example";

    $link = str_replace('post-new.php', "post-new.php?post_type=$post_type", $link);
    $link = str_replace('?u=', '&u=', $link);

    return $link;
}
add_filter('shortcut_link', 'press_this_ptype', 11);

Once you add the correct Post Type, WordPress will detect all taxonomies attached to it automatically (if they’re specified on the custom taxonomy code, obviously).

You can have multiple “Press This” bookmarklets for different post types. Just change the post type in the snippet above and save a new bookmarklet.

Leave a Comment