How to Add News Feed WordPress Admin Dashboard

This article is for easy and quick tip on how to add news feed to the WordPress Dashboard. RSS feeds benefit publishers by letting them syndicate content automatically. I you ever feel like you want to change the source of the news items on the WordPress dashboard here is how to do it. WordPress developers can add this feature in their theme as a theme support option. I have also developed a plugin for this task. You can download this plugin from WordPress plugin directory.

So let’s start to adding custom news feed your WordPress theme admin dashboard. Adding this snippet to the functions.php of your WordPress theme will let you replace the existing RSS feed widget with another RSS feed. This function adds your custom feed url to the admin dashboard. Customize as required for display your custom news feed WordPress dashboard.

 

function esoft_dashboard_news_feed() {
     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', 'YOUR_FEED_NAME' , 'dashboard_custom_feed_output' ); 
}

function dashboard_custom_feed_output() {
echo '<div class="rss-widget">';
wp_widget_rss_output(array( 'url' =&gt; 'https://www.e2softsolution.com/feed/', 'title' =&gt; 'YOUR_FEED_TITLE', 'items' =&gt; 3, 'show_summary' =&gt; 1, 'show_author' =&gt; 0, 'show_date' =&gt; 1 ));
echo '</div>';
} 
add_action('wp_dashboard_setup', 'esoft_dashboard_news_feed');

Just paste this on your theme functions.php file and replace “YOUR_FEED_NAME” by your news feed name, “https://www.e2softsolution.com/feed/” by your feed URL, “YOUR_FEED_TITLE” by your feed title, input display item no, 0 or 1 for show date & author. That’s all for adding custom news feed you your WordPress theme admin dashboard.

download

Leave a Comment

Your email address will not be published.