Warning: strpos(): Empty needle in /home/mobiloud/public_html/help/wp-content/plugins/sg-cachepress/core/Htaccess/Htaccess.php on line 106

Warning: Cannot modify header information - headers already sent by (output started at /home/mobiloud/public_html/help/wp-content/plugins/sg-cachepress/core/Htaccess/Htaccess.php:106) in /home/mobiloud/public_html/help/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher_Helper.php on line 46
Building a news aggregation mobile app with WP RSS Aggregator – Help & Support
  1. Home
  2. Building a News app
  3. Building a news aggregation mobile app with WP RSS Aggregator

Building a news aggregation mobile app with WP RSS Aggregator

We’ve worked with the fine folks at WP RSS Aggregator to help them build mobile apps for their WP News Desk website.

The result is a great example of what can be achieved combining their fantastic RSS aggregation plugin with our News mobile app platform.

The WP News Desk app aggregates all the most interesting WordPress news from the community and makes it available on your mobile (on iOS and Android), which you can download for free and test out.

Want to build an app like this?

Here’s what you need:

The app will show your aggregated content out of the box, but there might be some changes you’d want to do to ensure you’re respecting the original author’s rights.

WP News Desk asked us to make the following edits:

  • The source name should appear below the article’s title
  • An excerpt should be displayed, no full content unless it’s a post we created ourselves
  • A button should be added to let users navigate to the news source

So what follows is the exact code we used on their site, using the MobiLoud’s plugin own code editor.

PHP right of date:

We show the content source below the title, aligned right


$post_id = $post->ID;
$src = '';
  $source = get_post_meta( $post_id, 'wprss_ftp_feed_source', true );

  if ( ! empty( $source ) ) {
      $src = get_the_title($source);
print($src);
  }

PHP before content:
We print the excerpt (summary), only when the article is imported from RSS Aggregator


if ($post->ID == 232241) echo do_shortcode( '[wprss_custom_feed_listing order="ASC"]' );

$excerpt = html_entity_decode(urldecode(strip_tags(get_the_excerpt($post->ID))));
$excerpt = str_replace('Continue Reading →', '', $excerpt);

$source = get_post_meta( $post_id, 'wprss_ftp_feed_source', true );
if (! empty( $source ) ) {
print($excerpt);

}

ob_start();


PHP after content:
We add a button linking to the original article source.
$data = ob_get_clean();

  $src = '';
        $url = '';
  $source = get_post_meta( $post_id, 'wprss_ftp_feed_source', true );
if ( empty( $source ) ) {
echo $data;
}
  if ( ! empty( $source ) ) {
      $src = get_the_title($source);
            $url = esc_url( get_permalink( $source ) );
  

 ?> 
<br>
<div style="text-align:center;">
<a href="<?php print($url); ?>" class="continue_button">Continue on <?php print($src); ?></a>
</div>
<?php } 

Related Articles