as the 5 parameter to add_menu_page() you send the resultat of running the function, insted of sending a callable reference to the function, as you did in the add_action.
$hookname = add_menu_page (
'My Slider',
'My Slider',
'manage_options',
'my_slider',
array( 'My_Slider', 'render_admin_menu')
);
Related Posts:
- Hide pages depending on role
- Ad custom admin page like WordPress customizer [closed]
- How can I make a menu link visible only to admins (without plugins)?
- Changing the Order of Admin Menu Sections?
- wp_nav_menu: show menu only if one exists, otherwise show nothing
- Add separator to admin submenu
- Renaming a WordPress Admin Menu
- Automatically remove trashed pages from nav menu
- How do I fix this error: Warning: invalid argument supplied for foreach()?
- How to add menu to Dashboard that can be viewed by all users
- List children of second level sub page
- Move admin menu at the end
- How to get current page menu item name instead of full menu item list
- How to display custom post meta in the appearance->menus page
- Change menu items URL
- how to only add a top-level admin menu without it creating a sub-level-menu
- Making WordPress’ page and menus visible only for logged in users, checking session variables
- WordPress – site with 2 stylesheets and more…
- Getting post content within wp_nav_walker
- wp_list_pages sort order is different for different languages [closed]
- Remove Metabox from Menus screen
- Sort wp_nav_menu() by menu order
- list pages only from master parent
- Custom Admin Menu Order
- wp_list_pages: only show subpages on the parent page?
- Disabling ‘posts’ in Appearance > Menus
- Auto add pages to primary menu with functions.php
- Does loading of sub pages in menu cause load to the server?
- Get admin menu link
- WordPress menu permalink redirects to wrong page
- Hook for number of items in Appearance > Menus > CustomPostType > View All [duplicate]
- Link to Homepage in Menu
- SlideDeck 2, make back-end visible for admins only
- Programmatically add existing pages and subpages to Appearance Menu
- How to retrieve parent menu item name of current submenu item
- When clicking on menu item not going to specific page
- Admin menu structure
- Appearance Menus Screen – menu item drop down menu not functioning
- Displaying different page links on different pages
- Create custom page and add it in nav menu by code
- Does is_child() exist in wp 3.5.1?
- How to highlight 1st level menu item based on actual page
- Admin-ajax.php 500 error when Add to menu is clicked in admin
- How can I switch pages?
- Prevent menu from loading in a page template [duplicate]
- Can I have custom post types in “Add menu items” on in the Admin > Appearance > Menu
- Add Labels to Admin Menu ( How To )
- How to create a menu item which is not a page
- How to add a page to header that is outside of WordPress?
- How to Structure Pages and Subpages
- Highlighting top level link when viewing one of it’s sub-pages, which are not linked in the menu
- Adding top level items in the admin menu that link to a post
- Add (grand)child pages automatically to nav menu
- how avoid the link of the current post in the menu in the sidebar?
- Page appears after de registering from menu
- Get parents child pages
- How to get submenu of admin menu?
- Strange menu behaviour wordpress admin [duplicate]
- Menu deletes all items and position – wordpress bug?
- Dynamic menu wp_list_pages displaying only current branch including: current page, his siblings and its childs
- wp_nav_menu without menu or theme_location specified
- wp_list_pages Hierarchical Help
- Parent Page > Child Page Menu
- Making pages in a menu appear conditionally
- Add pages content to startpage through custom menu
- Lost admin “manage_link” capability WordPress. No “Links” menu item in admin menu
- Main menu navigation links and new pages
- Page header menu links change
- Catagorized hierarchy menu for PAGES!
- Add a menu metabox to post edit page
- Setting or plugin for showing submenus horizontally under the main menu, and keep them after selection
- Page dependent sub-menu?
- adding pages in underscores.me theme
- How to get the Page Name of the current page?
- Need to remove the admin menu item from a be theme in wordpress
- Add category label for appearance > menus items
- Removing wp admin menu item on top bar of admin backend
- Add CSS Class to WordPress Menu Item Dependent on the Page the User is Visiting
- How can I order these pages in this navigation bar on this old wordpress theme?
- WP pages content is missing in frontend
- Unable to remove page from primary menu
- Links in new menu don’t work
- How to sort a sub-menu, generated with get_pages(), by the page order instead of alphabetically?
- Any simple way to show 10 previous pages by id to current page in links as a menu
- wp_is_mobile() inside js
- Specific Page that convert Hyperlink to anchor in nav menu
- WordPress – Apperance > Menu
- Customizing label/title output of admin nav_menu selecter
- Query for menus in backend (BE)
- How do I fix the URL used in the WordPress admin menu for customize.php
- How can I disable sorting/dragging of a menu item in the custom menu admin?
- Two pages named the same thing, on a different level but conflicting url paths in menus and direct links
- Site with all content on the front page
- Some informations about the use of statics pages in WordPress
- How to change the markup created by menu item only on chosen items?
- my theme automatically adds new pages to menu
- how can i get the page_ID in nav li [closed]
- Add a page to a subscribers account
- Control page access based on User Meta data?
- How to change WP menu item type?