Hi S.M.,
Are you using the widget or the template tag? If it’s the latter, can you please post your code here?
Since there were no more responses from you, I’m going to assume you managed to solve the issue by yourself and thus I’m marking this topic as resolved. If the issue persists, please feel free to mark it again as unresolved and make a comment so I can notice it.
Hi there Hector. Apologies about the delay. No, we’re just using the plugin as far as I’m aware, though there is a template tag listed under Appearance > Editor > Loop.php. Is this the code you’re looking for?
<?php if (is_home()): ?>
<?php if (function_exists(‘wpp_get_mostpopular’)) wpp_get_mostpopular(“range=monthly&limit=3&stats_comments=0&post_type=post&thumbnail_width=100&thumbnail_height=60&excerpt_length=55”); ?>
<?php endif; ?>
Let me know if it is. If not, what SHOULD I be looking for, and is there further information you require? Thanks again for all your help!
Seth
Hey Seth, thanks for replying back!
Assuming you’re using the latest version of the plugin (v2.3.5 at the time of writing), try this:
<?php if (is_home()): ?>
<?php if (function_exists('wpp_get_mostpopular')) wpp_get_mostpopular("range=monthly&limit=3&stats_comments=0&post_type=post&thumbnail_width=100&thumbnail_height=60&excerpt_length=55&post_html='<li>{thumb} {title} <span class=\"wpp-excerpt\">{summary}</span></li>'"); ?>
<?php endif; ?>
By default, the wpp_get_mostpopular()
template tag doesn’t include the excerpt part, so even when passing the excerpt_length
parameter it won’t work unless you tell the plugin to include it (notice the post_html
parameter?). And yeah, I know this should be properly documented – I always forget about adding this stuff to the FAQ.
Thanks! No worries. So what I’m understanding here, then, is that I copy the code block above into the section where the previous block existed in Appearance > Editor > Loop.php? And will I have to make any changes to the plugin itself? I appreciate all your help on this, just trying to get it all sorted the right way. Appreciate the help!
Seth
Exactly, you can simply replace the code you have in your loop.php file with the one I posted before and that should be it. No need to edit the plugin either, so don’t worry about it.
Cool. Looks good! Thanks. Now, we’re just in the process of trying to style it so this puppy arranges the posts side-by-side (I assume we’ll have to edit the plugin directly for that) Any specific FAQ links you can recommend to get me pointed in the right direction?
Seth
I was just working on it, and this development version (updated a couple of minutes ago) already includes something like that (see http://www.9hill.com/, for example).
Edit: oh, by “posts side by side” you mean like a carousel? I know I saw a live site using WPP with something similar not long ago, I just can’t remember on which topic that was posted 😛