Remove unwanted HTML Headers from WordPress

// Remove unwanted html header
function remove_header_info() {
    remove_action('wp_head', 'rsd_link');
    remove_action('wp_head', 'wlwmanifest_link');
    remove_action('wp_head', 'wp_generator');
    remove_action('wp_head', 'start_post_rel_link');
    remove_action('wp_head', 'index_rel_link');
    remove_action('wp_head', 'adjacent_posts_rel_link');
}
add_action('init', 'remove_header_info');
Advertisements

Display External RSS Feeds in our Site

Here is the code for displaying External RSS Feeds in our Worpdress Site.

<?php include_once(ABSPATH.WPINC.'/feed.php');
$rss = fetch_feed('Feed URL Goes Here');
$maxitems = $rss->get_item_quantity(4);
$rss_items = $rss->get_items(0, $maxitems);
?>
<ul style="font-family:Helvetica;font-size:15px;list-style:square;">
<?php if ($maxitems == 0) echo '<li>No items.</li>';
else
// Loop through each feed item and display each item as a hyperlink.
foreach ( $rss_items as $item ) : ?>
<li>
<a href='<?php echo $item->get_permalink(); ?>'
title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>' target="_blank">
<?php echo $item->get_title(); ?></a>
</li>
<?php endforeach; ?>
</ul>

Keep Spreading…