Firstly, you should absolutely not modify core files. Ever. Any changes you make to core files can and will be overwritten any time WordPress updates. There are umpteen ways in which WP has been written to allow you to change its behaviour without hacking on core files: hooks, filters, APIs. Use those instead.
In this case you should be writing a plugin, because you’re changing functionality. That’s in a plugin’s wheelhouse, a theme should only be concerned with displaying the frontend of the site.
You can add to the sidebar with add_menu_page()
and add_submenu_page()
, both of which are well documented in the developer docs I linked.
Related Posts:
- Can’t extend some core classes
- Remove metabox from WordPress menu editor page?
- Redirect to another page using contact form 7? [closed]
- How can I update WordPress plugins or WordPress itself in all server?
- How to disable sub menu items from being created?
- WP Admin Bar – Get current theme name as custom menu title
- Set custom post type to load custom block pattern by default
- WordPress menu deletes when trying to add a hook
- Logout and redirect using the WP Menu
- Remove all nav menu classes ( but keep useful ones… )
- wordpress custom post type remove duplicate menu item
- How to create Sub Sub domain Multi User blogs?
- Sortable admin column for one meta key with three possible meta values
- Second Navigation inside header
- Why am I getting ERR_NAME_NOT_RESOLVED when I add a site to my multisite installation? [closed]
- Creating new menu item
- WordPress if (is_page) translation on certain page
- Performance issues with large website [closed]
- Programmatically create menu with custom link
- Custom Loop through category menu to include sub categories
- How to add custom taxonomy slug in CPT permalink?
- How to make in WordPress admin panel sortable column for the custom field, that count the number of page impressions?
- selected menu item
- How can I add a custom class to only nav sub-menu > li > a items in WordPress?
- items_wrap not working
- How to override wp-admin styling
- List User order by ID in Descending order (Backend)
- Style wp_page_menu() items
- JQuery not working on WordPress Admin page [closed]
- wp nav menu: add attributes to menu items [duplicate]
- Custom php page outside the scope of my theme
- Have CSS Class Added with `is_page()` WP function
- Admin username and password
- White Screen of Death – wp-admin
- Admin notice not displaying
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Run a filter when a walker runs
- WordPress (3.9.1) MultiSite Permissions. Is chown the answer?
- How to display conditional-content if wp_nav_menu( $args ) retruns something
- Adding hreflang tags automatically in WordPress subdirectory multisite
- Change Navigation Bar based on logged in or not
- Show comments menu in dashboard only if the site has comment
- Trouble creating conditional PHP for nav menu items with children for custom Walker
- Retrieving Author ID in wp-admin area
- Count top level menu items
- create a select input with menus created on a custom options page
- How to add values to media “whitelist_options” in wp-admin/options.php template?
- Multiple WordPress Menus that will only display all pages
- Menu — How to add “current-menu-grand-ancestor” css class
- Input type search in Menu
- WordPress on AWS with ELB
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- WP Walker using custom css classes
- How to create a form and display its content as table in admin panel?
- Change list item content in menu navigation to add a child element with specific class
- How to change home or site url using action hooks or filter?
- Menu Limitations
- Namespace spl_autoload problem in WordPress admin
- How can I Add a variable PHP in the Menu Nav
- Where to place PHP code that inserts (or doesn’t insert) menu item?
- Unreadable pagination
- remove wp floating submenu in wp dashboard
- Adding an Avatar to the Top Nav Bar
- My custom wp-admin php files stopped working
- Automatically adding new post categories to menu
- wordpress media library new uploads don’t write to database
- Add data attribute to each li in menu
- Call to undefined function wp() in wp-blog-header.php
- Cannot access wp-admin (wordpress dashboard)
- Cannot access wp-admin/wp-login.php (WordPress backend) anymore, what could be wrong?
- WordPress returning 404 for multisite pages
- Custom Walker_Nav_Menu issue with variables on PHP 7.3
- How to call plugin function per site in a multisite?
- WordPress returns “The link you followed has expired” error page whenever I add a new site, add a user etc
- How to add an arrow to menu items has submenus
- How to make my custom widget appear within WordPress widgets? Plugin development
- wp_nav_menu returns menu list in ascending order. How can I arrange the menu same as dashboard menu
- How to display custom WP menus?
- Extend Menu Walker Output
- Is it legal to redefine wp_password_change_notification in a mu plugin?
- Nav-Menu not showing up
- Why, when moving a WordPress multisite network, have my theme customisations stopped working?
- 2 wordpress site same database
- Custom navigation menu with awsAccordion
- How to debug failed changes to posts?
- how to add a div inside wp_page_menu
- How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?
- Why in this WordPress theme I can’t see the Main Menu?
- Authentication from sub-folder non-wp cookie WordPress
- Show login greeting above sub-menu links?
- Why can’t I add a custom image in my navigation?
- Remove submenu item from list
- conditional: if is page, and all subpages
- wp nav menu: show submenu below li item
- How to tell if a user has gone in and created a menu
- need help adding a new sidebar to a page that can’t use page-templates -> multisite
- Dynamic Menu drops pages?
- Aspx/Rss feed – failed to open stream: Redirection limit reached
- How can I fix this code [duplicate]
- Class for Selected Menu using wp_nav_menu