Cara Merubah News Feed RSS WordPress dengan Feed Lain di Dashboard
Silahkan tambahkan kode berikut di file functions.php pada theme aktif wordpress anda
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’, ‘YOUR_FEED_NAME‘ , ‘dashboard_custom_feed_output’ );
}
function dashboard_custom_feed_output() {
echo ‘‘;
wp_widget_rss_output(array(
‘url’ => ‘http://wpsnipp.com/feed/’,
‘title’ => ‘MY_FEED_TITLE’,
‘items’ => 2,
‘show_summary’ => 1,
‘show_author’ => 0,
‘show_date’ => 1
));
echo ‘‘;
}
dan silahkan ganti pada YOUR_FEED_NAME dengan judul news feed rss anda.
Leave a Reply
Want to join the discussion?Feel free to contribute!