Under Advanced > RSS, there is the section for “The post %%POSTLINK%% appeared first on %%BLOGLINK%%.” This is applying content within the feed item’s description node. I need to extract that content.
I’ve combined two feeds from different blogs I manage using RSSMIX (http://www.rssmix.com/u/8225102/rss.xml) and have applied them to the bottom of the following landing page: http://knowgreaterpartnership.com/100-days-in-a-minute/
I’d like to show the blog’s name with each item and a link to that blog. How can I specify just that blog name and link?
This is the code I currently have:
<article>
<?php if ( function_exists( 'fetch_feed' ) ) { ?>
<?php include_once(ABSPATH . WPINC . '/feed.php');
$feed = fetch_feed( 'http://www.rssmix.com/u/8225102/rss.xml' );
$limit = $feed -> get_item_quantity(7);
$items = $feed -> get_items(0, $limit);
if ( !$items ) {
echo "problem";
}
else {
//everything's cool
foreach( $items as $item ){ ?>
<div class="feed-post">
<h2 class="post"><a class="link" href="<?php echo $item -> get_permalink(); ?>" target="_blank"><?php echo $item -> get_title(); ?></a></h2>
<p class="date"><?php echo $item -> get_date( 'F j, Y' ); ?></p>
<p class="blogname"><a href="The Blog Link">The Blog Name</a></p>
</div>
<?php }
} ?>
<?php } ?>
</article>
This line is where this content would go.
<p class="blogname"><a href="The Blog Link">The Blog Name</a></p>
Thank you