WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like another "Add post" button in the admin except I am going to call it "Add voucher". It will run specific plugins that add post will not. However that is irrelivant, all I need to know it how to add another add post button with the same features.

share|improve this question

Unfortunately this isn't possible (without a slight hack)- since there are now hooks provided (see for example the edit.php page)

A quick an easy hack is to use javascript to add the link after the usual 'Add New' link. Here I've used the admin_print_footer_scripts hook (on 'post', or 'edit-post' screens) to print the javascript. Note you alter this to work for other post types.

function wpse57033_add_new_voucher_link(){
    $screen = get_current_screen();
    if( $screen->id == 'edit-post' || $screen->id == 'post' ){
            jQuery('.wrap h2 .add-new-h2').after('<a href="" class="add-new-h2">Add New Voucher</a>');
share|improve this answer
@RuturaajPatki asked why some people check $variable == 'value' and others 'value'== $variable. I've been lazy in this answer, but the latter is best practise (see this for an explanation). Otherwise they are the same. – Stephen Harris Jul 1 '12 at 14:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.