Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // http://www.gravityhelp.com/forums/topic/remove-add-form-button-from-custom-post-type-edit-page
- add_action('admin_head', 'hide_add_form_icon');
- function hide_add_form_icon() {
- global $post_type;
- // edited July 3 2014 to fix PHP warnings
- if ((isset($_GET['post_type']) && $_GET['post_type'] == 'directory') || ($post_type == 'directory')) {
- echo "<style type='text/css'>a#add_gform {display:none;}</style>\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement