- This topic is empty.
-
AuthorPosts
-
July 20, 2009 at 9:24 am #25524
jandreoni
MemberHello, all–
My current client is looking for the following: Her actual site is in static HTML with a link to her WP blog that is on her domain. But, she also wants, on the static HTML homepage of her site, to have a little "Feed" of the most recent update to her blog (including upcoming shows, etc.) that would only feed if she uses a certain tag in WP when creating her post.
Does this make sense, and is this possible? Probably using PHP or something, I assume.
And just for the record, she doesn’t want the whole site built in WP, just the blog and the ability to feed recent posts from the blog to the home page.
Thanks for any help!
–Jason
July 21, 2009 at 6:41 am #61052jandreoni
MemberThanks for the reply, Apostrophe. Right now, though, her current site is built (has been for about 6 months now) and I was hoping to avoid doing a complete conversion over to WP. This was just something she was asking about. I’ll take a look at the Simplepie site.
Anyone else have any ideas? Some PHP perhaps?
July 21, 2009 at 1:49 pm #61065jandreoni
MemberThanks, ikthius. I PM’d you to pick your brain!
July 22, 2009 at 11:03 am #61278mattvot
MemberThe easiest way is SimplePie.
Use this url as the rss feed for your site
July 22, 2009 at 12:48 pm #60806davesgonebananas
MemberSome really good ideas posted so far in this thread, so I thought I’d add another one to the mix:
You can actually do this by adding only some Javascript to your existing HTML (through the magic of jQuery). There is even a jQuery plugin to make this process easier – http://plugins.jquery.com/project/jFeed
Example (courtesy of GitHub):
Code:
jFeed – jQuery feed parser plugin – example
jQuery(function() {
jQuery.getFeed({ url: 'proxy.php?url=http://www.hovinne.com/feed/', success: function(feed) {
jQuery('#result').append('
' + '' + feed.title + '' + '
');
var html = '';
for(var i = 0; i < feed.items.length && i < 5; i++) { var item = feed.items[i]; html += '
' + '' + item.title + '' + '
';
html += '
' + item.updated + '';
html += '
' + item.description + ''; }
jQuery('#result').append(html); } }); });
jFeed – jQuery feed parser plugin – example
November 12, 2009 at 2:27 am #66480Thad Knows Web
MemberI’m doing something similar on a site that I’m working on. I’m including two loops, though. I tested it and it works fine. One of the loops just shows one post and the other loop shows two. Is there any code I can add to exclude the latest post on my second loop? I’m not very familiar with PHP but I was thinking there could be something I could add to this snippet:
Code:November 12, 2009 at 10:11 am #66491Thad Knows Web
MemberI found out how to do this:
Code:query_posts(‘showposts=5&offset=1’); // Second loop, we get 5 posts excluding the most recent.
if (have_posts()) :
while (have_posts()) : the_post(); ?>
// WordPress loop
endwhile;
endif; ?>via http://www.wprecipes.com/avinash-asked-how-to-use-two-different-wordpress-loops
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.