Skip to content

Commit

Permalink
Hide the 'Add new' menu with CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
gikaragia committed Dec 20, 2023
1 parent 19ae17e commit 3a72581
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions assets/css/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
@include jm-icon();
content: "\e830";
}

a[href="post-new.php?post_type=job_listing"] {
display: none;
}
}

#menu-posts-resume {
Expand Down
1 change: 0 additions & 1 deletion includes/admin/class-wp-job-manager-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ public function admin_enqueue_scripts() {
* Adds pages to admin menu.
*/
public function admin_menu() {
remove_submenu_page( 'edit.php?post_type=job_listing', 'post-new.php?post_type=job_listing' );
$item = remove_submenu_page( 'edit.php?post_type=job_listing', 'edit.php?post_type=job_listing' );
if ( ! $item ) {
return;
Expand Down

0 comments on commit 3a72581

Please sign in to comment.