Array_Slice error when trying to RSS feed sites own comments
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Array_Slice error when trying to RSS feed sites own comments’ is closed to new replies.
17 years, 10 months ago
Hi there,
When I try to use the below code to get the 5 latest comments, I get this error :
Warning: array_slice() [function.array-slice]: The first argument should be an array in /home/site/www/wp-content/themes/default/sidebar.php on line 123
Code :
The frustrating thing is : when I put another RSS feed into the fetch_rss location field, it works just fine.
Directly inputting the /sites/comment/feed address into the fetch_rss location field also does not work. Same error.
Going with Firefox to /site/comments/feed works just fine.
This happens whether or not I have the Feedburner FeedSmith plugin turned on.
As a side note, how can I reduce the number of characters returned to say, 50?
Thanks VERY much for your help on this, I really need assistance here.
Line 123 is BTW –
$items = array_slice($feed->items, 0, $maxitems);