Visiting a console submenu page does not expand its parent menu item

You can use the parent_file hook to ensure the TDLRM menu is expanded when viewing the “Store users” or “Categories” page. add_filter( ‘parent_file’, ‘wpse_398962_parent_file’ ); function wpse_398962_parent_file( $parent_file ) { global $submenu_file, $typenow; // 1: This is for highlighting the TDLRM » “Store users” submenu. if ( ‘users.php’ === $parent_file && ! $submenu_file && isset( … Read more

Display Plugin Panels Outside of Admin Areas

Look at the markup for the callback function called by add_theme_page() or add_settings_page(), and use that markup to create a custom Page template. For code that simply outputs content, this should be fairly straight-forward; for code that actually saves settings, you’re probably going to have to do more work in order to create front-end data … Read more

Admin top level menu, pointing to an external url

Just add your custom item into $menu instead of $submenu. Use here as a reference for parent menu structure. http://core.trac.wordpress.org/browser/tags/3.2.1/wp-admin/menu.php Eg. add_action( ‘admin_menu’ , ‘admin_menu_wpse32975’ ); function admin_menu_wpse32975() { global $menu; $menu[9999] = array( __(‘My Menu’), ‘manage_options’, ‘http://www.google.com’, ”, ‘open-if-no-js menu-top’, ”, ‘div’ ); }

How can I add a menu item to the admin area?

The code itself is fine. But you would need to activate the plug-in: you can’t simply place the file in the plug-ins directory. You will need to give the plug-in a ‘header’ too. See the Codex. Alternatively, place the code in your theme’s functions.php, but really it should be in a plug-in.

avoiding the display of certain categories to certain user roles at content entry time

It uses get_terms and wp_get_object_terms internally to get the categories. You can achieve what you want using a filter associated with these functions. <?php //$args = apply_filters( ‘get_terms_args’, $args, $taxonomies ); add_filter(‘get_terms_args’, ‘wpse53900_filter_cat’); function wpse53900_filter_cat($args, $taxonomies){ //this is where you can check the taxonomies and roles to filter out the ones you want //additionally, make … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)