SHOW:
|
|
- or go back to the newest paste.
1 | - | See http://pastebin.com/3TcsfDhb |
1 | + | <?php |
2 | // http://www.gravityhelp.com/forums/topic/remove-add-form-button-from-custom-post-type-edit-page | |
3 | add_action('admin_head', 'hide_add_form_icon'); | |
4 | function hide_add_form_icon() { | |
5 | global $post_type; | |
6 | // edited July 3 2014 to fix PHP warnings | |
7 | if ((isset($_GET['post_type']) && $_GET['post_type'] == 'directory') || ($post_type == 'directory')) { | |
8 | echo "<style type='text/css'>a#add_gform {display:none;}</style>\n"; | |
9 | } | |
10 | } |