Dashboard :10 Last draft page and 10 last pending review page (metabox)

#dahsboard BOXES #Last edited pages add_action( ‘wp_dashboard_setup’, ‘admin_dashboard_last_edits_register’ ); function admin_dashboard_last_edits_register() { wp_add_dashboard_widget( __FUNCTION__, __( ‘Last published pages ‘, ‘admin-dashboard-last-edits’ ), ‘admin_dashboard_last_edits_dashboard_widget’); } function admin_dashboard_last_edits_dashboard_widget() { $posts = get_posts( array ( ‘numberposts’ => 10, ‘post_type’ => array ( ‘page’ ), ‘orderby’ => ‘modified’) ); if ( $posts ) { $date_format = get_option( ‘date_format’ ); echo … Read more

Need Help Figuring Out Admin Menu Hover Styling Class

#adminmenu li.menu-top:hover, #adminmenu li.opensub>a.menu-top, #adminmenu li>a.menu-top:focus { position: relative; background-color: #191e23; color: #00b9eb; } Make sure your plugin is using the structure: <li> <- position within admin menu is as a list item, using the <li> tag. <a>LINK</a> <- main link <ul> <- submenu container <li><a>submenu item here</a></li> </ul> </li> ofc dont put anything with … Read more

Show comments menu in dashboard only if the site has comment

Okay, the solution is this below to hide Comments menu if the site doesn’t have any comments (approved, pending, trash or spam). function remove_commentsmenu() { global $user_ID; if ( 1 > wp_count_comments( get_the_ID() )->total_comments && 1 > wp_count_comments( get_the_ID() )->trash ) { remove_menu_page( ‘edit-comments.php’ ); } } add_action( ‘admin_menu’, ‘remove_commentsmenu’ );

Adding widget to dashboard with wp_dashboard_setup not working

Use this code to require the file from your theme’s functions.php file: require get_template_directory() . ‘includes/dashboard.php’; For the sake of completeness (and sanity) my dashboard.php file lives here: my-theme/includes/dashboard.php I took a closer look at the original issue, and I think what’s happening is that the require statement is silently failing because the wp-admin/includes/dashboard.php file … Read more

Add multiple images to author profile page

You can use this for an author photo: http://wordpress.org/extend/plugins/user-photo/ And this one might give you multiple images for the author: http://wordpress.org/extend/plugins/sem-author-image/ The final approach is to use a gallery plugin of some kind (NexGen Gallery Perhapse?) and create an album for each author, labeling it “John Doe”. Then, call the gallery in the authors.php file … Read more

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