30 pointsStarting to get into this DEV thingI'm new here
natural
Member
—
8th July 2010 (1 year ago)
Hello again,
I have the recent post plugin installed and working. However, I'm trying to parse the posts so that the blog title, avatar and body have start and end tags.
I have the recent post plugin installed and working. However, I'm trying to parse the posts so that the blog title, avatar and body have start and end tags.
Is there anyway to query the comments or date of the post?
Also, I would like to have a string of "Popular Post" is there a plugin that does the same as "recent posts" yet instead of by date is does by views or comments?
Is there anyway to query the comments or date of the post?
You'd have to do a bit of modifying for that. Basically you'll need to pull the date stamp from the post indexer table and then use the date() function to format it into a readable date format.
Also, I would like to have a string of "Popular Post" is there a plugin that does the same as "recent posts" yet instead of by date is does by views or comments?
Responses (3)
Erstwhile founder — 8th July 2010 (1 year ago) #
Hiya,
Is there a reason you can't use a list?
If you're really stuck on doing it the way you want you can use this:
display_recent_posts(10,40,150,'','<h3>','</h3>','','','
You'll then have to replace line 80 with this:
echo '<p>' . substr($tmp_post['post_content_stripped'],0,$tmp_content_characters) . '</p>';
If you need to make other edits the section of code you're looking for is between lines 64 and 81.
Keep in mind that 64 is not a valid avatar size. Valid sizes are 16, 32, 48, 72 and 128.
Thanks,
Andrew
Member — 8th July 2010 (1 year ago) #
Thanks Andrew!
Is there anyway to query the comments or date of the post?
Also, I would like to have a string of "Popular Post" is there a plugin that does the same as "recent posts" yet instead of by date is does by views or comments?
Erstwhile founder — 9th July 2010 (1 year ago) #
Hiya.
You'd have to do a bit of modifying for that. Basically you'll need to pull the date stamp from the post indexer table and then use the date() function to format it into a readable date format.
Not yet.
Thanks,
Andrew
Become a member