Wordpress help required in functions.php

Discussion in 'Content Management' started by spoilt, Sep 16, 2011.

  1. #1
    I am getting the following errors as notified by my theme dashboard. Please help me in this regard. The thing is related to RSS. I was using feedburner but have switched to the default RSS link, thinking that was the culprit. However, I have no idea why I am getting this error. Everything on the site was just working fine, the infolinks, adsense, tynt, etc. However, since the past few days, I am unable to see any infolinks on my site, though the correct code has already been added. Please help.

    My site is: www.thetechnofreaks.com
    Following are the errors. Please look into them.

    Warning
    : array_slice() expects parameter 1 to be array, null given in /ZZZ/ZZZ/public_html/wp-content/themes/techblog-single-pro-psd/functions.php on line 827

    Warning: Invalid argument supplied for foreach() in /ZZZ/ZZZ/public_html/wp-content/themes/techblog-single-pro-psd/functions.php on line 829

    FROM functions.php line 827 onwards:
       $rss->items = array_slice($rss->items, 0, 6);    
    $channel = $rss->channel;    
           foreach ($rss->items as $item ) {        
           $parsed_url = parse_url(wp_filter_kses($item['link']));        
           echo "<li><b><a href=" . wp_filter_kses($item['link']) . ">" . wptexturize(wp_specialchars($item['title'])) . "</a></b></li>";
    }    
    echo "</ul>";  }    ?>
    PHP:

     
    Last edited: Sep 16, 2011
    spoilt, Sep 16, 2011 IP
  2. crispunk

    crispunk Member

    Messages:
    196
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #2
    It look like rss is not returning Anything hence you get the errors
     
    crispunk, Sep 23, 2011 IP