
Now our news is on your blog RSS
Now if you want to read our news every time you visit your blog instead of news from wordpress.org in your dashboard (dashboard), it will be enough for you to add a code snippet to the functions.php file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | add_action('wp_dashboard_setup', 'my_dashboard_widgets'); function my_dashboard_widgets() { global $wp_meta_boxes; unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'], $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'], $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] ); wp_add_dashboard_widget( 'dashboard_custom_feed', 'wp-admin.com.ua - news' , 'dashboard_custom_feed_output' ); } function dashboard_custom_feed_output() { echo '<div class="rss-widget">'; wp_widget_rss_output(array( 'url' => 'https://feeds.feedburner.com/WordPressLessons', 'title' => 'wp-admin.com.ua - news', 'items' => 4, 'show_summary' => 1, 'show_author' => 0, 'show_date' => 1 )); echo '</div>'; } |
Thus, you can display not only the news of our blog, but also any other who has an rss channel.
The feature will be useful for multi-user blogs, to show blog news in the admin area of its visitors. Good luck with development!
Follow us, we will try to make interesting publications.

/*

- Basic web design course;
- Site layout;
- General course on CMS WordPress and continuation of the course on template development;
- Website development in PHP.