trying to create a simple reader that includes featured image, title and brief description. I have all of this now but it includes more than I want and I don't know how to shorten things up.
The feed actually shows the featured image twice. I was trying to get the image separate from the description and found a short code that did this. BUT I don't know the code to get it to show in my reader, so for now it's being pulled from the description. There is also a blurbage at the end of each that I want to remove "post name appeared first on...".
I'm pulling posts from http://blog.empow.me/feed to http://staging.empow.me (listed on bottom of page)
This is the code I have currently:
<?php
// Get RSS Feed(s)
include_once( ABSPATH . WPINC . '/feed.php' );
// Get a SimplePie feed object from the specified feed source.
$rss = fetch_feed( 'http://blog.empow.me/topics/News/feed' );
$maxitems = 0;
if ( ! is_wp_error( $rss ) ) : // Checks that the object is created correctly
// Figure out how many total items there are, but limit it to 5.
$maxitems = $rss->get_item_quantity( 4 );
// Build an array of all the items, starting with element 0 (first element).
$rss_items = $rss->get_items( 0, $maxitems );
endif;
?>
<?php if ( $maxitems == 0 ) : ?>
<?php _e( 'No items', 'my-text-domain' ); ?>
<?php else : ?>
<?php // Loop through each feed item and display each item as a hyperlink. ?>
<?php foreach ( $rss_items as $item ) : ?>
<div class="empowblog-block">
<a href="<?php echo esc_url( $item->get_permalink() ); ?>"
title="<?php printf( __( 'Posted %s', 'my-text- domain' ), $item->get_date('j F Y | g:i a') ); ?>">
<?php echo esc_html( $item->get_title() ); ?>
</a>
<p><?php echo $item->get_description(); ?></p>
</div>
<?php endforeach; ?>
<?php endif; ?>
I'm not real familiar with coding but I'm trying to learn to get this working the way we need it to.
Thank you!