Quick Draft widget (dashboard.php) using custom post_type
So it seems the Quick Draft widget is hardcoded in three places with no hooks supplied. I’ve decided to go down the wp_insert_post route and write my own plugin 🙂
So it seems the Quick Draft widget is hardcoded in three places with no hooks supplied. I’ve decided to go down the wp_insert_post route and write my own plugin 🙂
Let’s dig into dashboard’s internals to see what we can do. https://core.trac.wordpress.org/browser/tags/5.3/src/wp-admin/_index.php#L129 First it renders welcome_panel via do_action( ‘welcome_panel’ ); so you can hook to it and output your custom content on top over all other widgets. You can also remove_action(‘welcome_panel’) before attaching your own to remove default or other content from being rendered there, … Read more
Add this code to the functions ///Show on the counter function my_custom_dashboard_widgets() { global $wp_meta_boxes; wp_add_dashboard_widget(‘custom_help_widget’, ‘Posts’,’custom_dashboard_help’); } function custom_dashboard_help() { $randoms= new WP_Query(array( ‘post_type’=>’post’,’post_status’=>’publish’,’order’=>’DESC’,’orderby’=>’ID’, ‘posts_per_page’=>’10’)); if($randoms->have_posts()) : while($randoms->have_posts()) : $randoms->the_post();?> <!—-post—-> <div class=”img-in” style=”width: 96%;height: 60px;margin-bottom: 7px;background-color: bisque;padding: 9px;”> <img src=”https://wordpress.stackexchange.com/questions/362675/<?php $thumb_id = get_post_thumbnail_id(); $thumb_url = wp_get_attachment_image_src($thumb_id,”thumbnail-size’, true); echo $thumb_url[0]; ?>” alt=”” style=”width: 50px;float: … Read more
You need to use the internationalisation APIs, these let you swap out hardcoded strings for localised versions, e.g. <p>Hello world</p> versus: <p><?php _e( ‘Hello world’, ‘joes_plugin’ ); ?></p> Then, you can use .po/.mo/.pot files to provide alternatives, e.g. a file with french translations, a file with russian etc. You’ll need to declare your translation text … Read more
Metabox collapsed by default
Do you see a line at the top looking like the below. If so just hover to the second icon from the left and click on dashboard.
Sorry I cant comment yet (need 1 more reputation!) We really need a lot more detail, Are you doing the changes in a visual editor? What theme / plugins are you using? Have you tried a standard theme and turning off all plugins? Start by loading the page in an incognito window or a different … Read more
this did the trick. it doesnt need to redirect, but just changes landing page. https://stackoverflow.com/questions/54068617/custom-buddypress-profile-page-set-as-landing-page-bp-default-component
If you want to exclude menu items by their labels: function hide_menu_items( $items ) { $items_to_exclude = [‘Menu Item 1’, ‘Menu Item 2’]; if ( !current_user_can( ‘manage_options’ ) ) foreach ($items as $key => $item) if ( in_array( $item->title, $items_to_exclude ) ) unset( $items[$key] ); return $items; } add_filter( ‘wp_get_nav_menu_items’, ‘hide_menu_items’, 20 );
have a look at this, cause that seems to have changed for ur user with ur modifications: https://wordpress.org/support/article/roles-and-capabilities/#:~:text=WordPress%20has%20six%20pre-defined,“%2C%20and%20“edit_users“. would be better to tell us which theme modifications u made, otherwise it’s impossible to tell why what happened!