discover more
Latest Word

TUTORIALS, THOUGHTS and RAMBLINGS

Add Your Own News Feed to WordPress Dashboard

This is a quick tip on how to add a news feed to the WordPress Dashboard. For developers, this is a great way to stay in the front of your client by injecting your feed into the backend of their site.

The Dashboard already has several news feeds that load by default, most of which can be an annoyance. So let’s delete the unnecessary widgets (Plugins, WordPress Blog, WordPress News) and then add a widget that shows the most recent posts from your site.

Add this to your functions.php file.

add_action('wp_dashboard_setup', 'my_dashboard_widgets');
function my_dashboard_widgets() {
     global $wp_meta_boxes;
     // remove unnecessary widgets
     // var_dump( $wp_meta_boxes['dashboard'] ); // use to get all the widget IDs
     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']
     );
     // add a custom dashboard widget
     wp_add_dashboard_widget( 'dashboard_custom_feed', 'The Latest from Adam Scott', 'dashboard_custom_feed_output' ); //add new RSS feed output
}
function dashboard_custom_feed_output() {
     echo '
'; wp_widget_rss_output(array( 'url' => 'http://www.adamscottcreative.com/feed', //put your feed URL here 'title' => 'What\'s up from Adam Scott', 'items' => 4, //how many posts to show 'show_summary' => 1, 'show_author' => 0, 'show_date' => 1 )); echo "
"; }

Here’s the result:

About the author

Adam Scott is a freelance designer, developer and online marketer that specializes in helping startup companies build their online presence.

Adam is available for freelance work, so hire him for your next project!

Enjoyed this post?

Subscribe to my RSS feed and receive updates in your email!

13 Responses to “Add Your Own News Feed to WordPress Dashboard”

  1. Magpie says:

    This is brilliant and I have used it before. But now a strange problem has occured. The custom feed displays fine when logged in as admin but when logged in as client (editor) it doesn't load and the toggle doesn't work.
    I tried removing and reinstating but it made no difference. Any ideas what the problem might be?
    (unfortunally the site is not live yet so i have no URL)

  2. Enid says:

    hello there and thank you for your information – I’ve definitely picked up something new from right here. I did however expertise some technical issues using this site, since I experienced to reload the web site lots of times previous to I could get it to load properly. I had been wondering if your web host is OK? Not that I’m complaining, but slow loading instances times will sometimes affect your placement in google and could damage your high quality score if advertising and marketing with Adwords. Well I’m adding this RSS to my email and could look out for much more of your respective exciting content. Make sure you update this again very soon.

  3. Annis says:

    Howdy superb website! Does running a blog similar to this take a massive amount work? I have very little knowledge of coding however I was hoping to start my own blog in the near future. Anyways, should you have any recommendations or tips for new blog owners please share. I understand this is off subject nevertheless I simply had to ask. Kudos!

  4. victor says:

    The lots of financial manager are work in the market and provides their services. They have the great experience in the financial management filed. And the some have no enough experience to advice the batter plan to the client.

  5. WordPress MU makes it possible for those with websites to host their own blogging communities, as well as control and moderate all the blogs from a single dashboard. WordPress MU adds eight new data tables for each blog.

  6. jeremywilliams says:

    Ordinarily I surely not compose-up on destinations, in spite of the fact that I need to pass on until this one really constrained me to finish this, simply to say this is truly a helpful compose-up. website design company in delhi

  7. Today the education is a necessity, the education tend to use as a tool for reaching a specific target or personal mark. The education helps in country progress. Education is considered to the important for everyone. If the any country peoples are educated then the country makes progress.

  8. koks says:

    I appreciate your idea here. Definitely it has a good content. Thank you for imparting more of your own thoughts. Good job!))((

  9. Great ideas Adam. I found it useful to do for my own webpages. A lot of work has been done for these things but your idea is great to have a news feed on our own website. I try the different codes and complete the task but I did not understand that code. This one is simpler and better to make our own news feed.

  10. canada seo says:

    The search engine services are very helpful to increases the marketing of business products or services, these are helpful to business website ratings or traffic and also provides extra benefits.

  11. Jе finirai de voir ça dans la semaine

  12. gregor says:

    I have no clue how to include the news encourage in my assertion press site. I simply experienced numerous locales for this data yet not illuminated. I am joyful i discovered your site so i can add this class to my site at back end. The default sustains are constantly introduce yet to include my craved one is the thing that precisely i simply required.
    http://www.torontowebdesign.company/

  13. The article posted was very informative and useful. You people are doing a great job. Keep going.

Leave a Reply

Copyright © 2011 Adam Scott. All rights reserved.