Title: Display rss issue
Last modified: August 21, 2016

---

# Display rss issue

 *  [faamior](https://wordpress.org/support/users/faamior/)
 * (@faamior)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/display-rss-issue/)
 * Dear All,
 * I’m having a wired problem with my RSS. I’m trying to display latest news in 
   my subdomain web site, but simply it just wont work.
 * The link to my rss is [http://bpkg.gov.ba/vijesti/rss](http://bpkg.gov.ba/vijesti/rss)
   or [http://bpkg.gov.ba/vijesti/rss](http://bpkg.gov.ba/vijesti/rss), and when
   i use it in bellow code, it wont display any information. But, when i use any
   other rss feed (for example: [http://wordpress.org/news/feed](http://wordpress.org/news/feed)
   or any other, it is working.
 * here is my code:
    <h2><?php _e( ‘Recent news from Some-Other Blog:’, ‘my-text-
   domain’ ); ?></h2>
 * <?php // Get RSS Feed(s)
    include_once( ABSPATH . WPINC . ‘/rss.php’ );
 * // Get a SimplePie feed object from the specified feed source.
    $rss = fetch_feed(‘
   [http://mf.bpkg.gov.ba/feed&#8217](http://mf.bpkg.gov.ba/feed&#8217); );
 * 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( 5 );
 *  // 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 ) : ?>
    -  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());?
      >
    -  <?php endforeach; ?>
       <?php endif; ?>
 * thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [CharlyIBC](https://wordpress.org/support/users/charlyibc/)
 * (@charlyibc)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/display-rss-issue/#post-5117081)
 * Can’t say for sure this is the problem, as I just use a widget for my rss feed.
   But, in the code you displayed you have:
 * `$rss = fetch_feed( 'http://mf.bpkg.gov.ba/feed' );`
 * It should be mf.bpkg.gov.ba**/vijesti/**feed The code you’re using is just to
   your main site
 *  Thread Starter [faamior](https://wordpress.org/support/users/faamior/)
 * (@faamior)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/display-rss-issue/#post-5117124)
 * My bed, I use
 * $rss = fetch_feed( ‘**[http://bpk.gov.ba/vijesti/feed](http://bpk.gov.ba/vijesti/feed)**‘);
 * on my subdomain web site to display news/information from main web site.
 * This was working before. Also, I’m able to use other rss feeds from other web
   site, and it is working. It just wont work with the rss feeds within my domain
   and sudbomain. realy strange. And, I’m able to see feeds when i paste in my firefox.
 * thanks
 *  Thread Starter [faamior](https://wordpress.org/support/users/faamior/)
 * (@faamior)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/display-rss-issue/#post-5117188)
 * I contacted my hosting company which is [https://www.heartinternet.uk/](https://www.heartinternet.uk/)
   with the refer to this issue, and they provided me with some guides, which I 
   would like to share here with you.
 * They have loopback restriction, which doesn’t allow that one script calls another,
   as they said: this slows down the site. Only workaround solution is to user server
   path instead of url path for rss feeds.
 * They suggested me to try with:
    $rss = fetch_feed( ‘**/home/sites/bpkg.gov.ba/
   public_html/vijesti/rss**);
 * but this, also, doesn’t work in my case.
 * Any additional help and guides will be appreciated

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Display rss issue’ is closed to new replies.

## Tags

 * [RSS](https://wordpress.org/support/topic-tag/rss/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [faamior](https://wordpress.org/support/users/faamior/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/display-rss-issue/#post-5117188)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
