Custom search Dashboard widget

Firstly, let’s start off by cleaning up the query you have above. I’ve put it into Heredoc syntax to make it easier to read. $sql = <<<SQL SELECT * FROM {$tablename} — you should use interpolation when working in a string that can have variables WHERE ( — Your query will only ever match one … Read more

Sortable column (by numbers) in admin users

Is there something that I’m missing Yes, you need to actually add the function which will do the sorting based on your usercoins “sort by” value (that you set in your yoursite_manage_users_custom_column_sortable() function). So you would hook your function on users_list_table_query_args, then change the args so that the users are being sorted by the usercoins … Read more

Changing menu order of a specific plugin in dashboard

I could see “WP Links Page” is a custom post type, so if it’s not registered by your own code, e.g. it’s registered by a plugin (using register_post_type()), then you can use the register_post_type_args filter to change the menu_position argument like so: add_filter( ‘register_post_type_args’, ‘my_override_register_post_type_args’, 10, 2 ); function my_override_register_post_type_args( $args, $post_type ) { // … Read more

how to remove description from menu buttons?

I just inatalled it and used the Custom menus and i get no description Never the less.. This theme have a “disable description in Header Menu” feature. On Your wordpress menu go to: Graphene Options >> Display >> Navigation Menu Display Options.. Click the “disable description in Header Menu” And your done..

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’ ); }

Remove “Content” and “Discussion” from Right Now Dashboard Widget

Here are two methods: Method 1 You could remove the whole Right Now metabox from your dashboard: function custom_dashboard() { if(!current_user_can(‘manage_options’)){ // only remove it for non-admins remove_meta_box(‘dashboard_right_now’, ‘dashboard’, ‘core’); } } add_action(‘admin_init’,’custom_dashboard’); and then add another custom Right Now metabox with your custom code. You could for example check out the WordPress function wp_dashboard_right_now() … Read more

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