Remove Pricing Tables and Employees from Main Navigation


#1

Hi athemes team,

I’m using the Talon Pro theme (which is great, by the way), and I have a question about removing some of the features from the Wordpress Main Navigation menu found on the left side of the admin window.

Specifically, I don’t need the Pricing Tables and Employees option. Is there a way to remove them from the navigation so that I have a cleaner interface? Thanks!


#2

Hello there,

You can manage it in the custom menu panel under Dashboard > Appearance > Menus.

https://codex.wordpress.org/WordPress_Menu_User_Guide

Regards,
Kharis


#3

Hi Kharis,

Actually, I’m not asking about the website navigation menu, but when you’re in the Wordpress admin panel where you have that menu on the left hand side that allows you to access posts, plugins, etc. for your site. With the Talon Pro theme, there are several items added to this navigation menu like clients, services, pricing tables, and employees. And what I’m asking is how do I remove the Pricing Tables and Employees from the Wordpress admin interface so I can reduce clutter and unneeded items from that menu. I’m uploading an image to illustrate what I mean.

Thanks Kharis.


#4

To remove those two, try adding this snippet to your child theme’s functions.

    if( !function_exists( 'talon_pro_child_remove_post_type' ) ) {
        function talon_pro_child_remove_post_type(){
            unregister_post_type( 'pricing_tables' );
            unregister_post_type( 'employees' );
        }
    }
    add_action('init','talon_pro_child_remove_post_type', 9999);

If you don’t want to run one, alternatively you can use a plugin that allows the same purpose like Code Snippets or Functionality.

Regards,
Kharis


#5

Hi Kharis,

I created a child theme for Talon Pro and the coding you provided above did the trick. Thanks!

I have one other admin menu item I’d like to remove - Timeline Events. I tried duplicating the coding you gave adding timeline_events, but it’s still showing up in the admin menu.

Do you know what coding I need to add to the child theme functions.php to remove this item?

Thanks Kharis; appreciate your help. :slight_smile:


#6

Here’s what I wrote in the functions.php, Kharis, just in case you wanted to check it:

	unregister_post_type( 'timeline_events' );

#7

Hello there,

Does your final code look something like this:

    if( !function_exists( 'talon_pro_child_remove_post_type' ) ) {
        function talon_pro_child_remove_post_type(){
            unregister_post_type( 'pricing_tables' );
            unregister_post_type( 'employees' );
            unregister_post_type( 'timeline-events' );
        }
    }
    add_action('init','talon_pro_child_remove_post_type', 9999);

timeline_events looks incorrect. Please use timeline-events

Regards,
Kharis


#8

Hi Kharis,

That did the trick! It looks like it was the underscore between timeline and events was the problem. Thanks Kharis. Problem solved. :+1:t5:


#9

You’re welcome! Glad to have an opportunity to assist you.

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis