Welcome to WebmasterWorld Guest from 184.72.177.182

Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

News feed

News feed for wordpress

     
3:06 pm on Apr 4, 2012 (gmt 0)

New User

joined:Apr 4, 2012
posts: 4
votes: 0


Most wordpress themes I have used in the past come with a simple news feed for footer for the whole site or homepage, if not they use a widget to display this but I have noticed more and more that free themes don't integrate this, so I was wondering if there was a plugin that can add a news feed to a footer or is there a standard bit of html that I can add into the footer.php to make one?
12:54 pm on Apr 5, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lorax is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Mar 31, 2002
posts:7575
votes: 0


Welcome to WebmasterWorld!

Do you mean a news feed from another website? If so, these are RSS feeds and there are several ways to read and republish them on your website. Just look for RSS feed plugins.
1:08 pm on Apr 5, 2012 (gmt 0)

New User

joined:Apr 4, 2012
posts:4
votes: 0


Thanks for the welcome lorax, and no I mean feed through my own posts to the home page of the site on free themes that don't have that feature.
4:20 pm on Apr 5, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


The below example pulls the 5 latest posts from categories 6 and 12.


<?php
query_posts('showposts=5&cat=6,12');
while (have_posts()) {
the_post();
$date = get_the_date();
$permalink = get_permalink();
$title = get_the_title();
echo "<p><a class=\"your-post-class\" href=\"$permalink\" title=\"$title\">$title</a> $date By: ";
the_author_posts_link();
echo '</p>';
}
?>


More info on query_posts in the manual.