WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
[resolved] WPP: Issue with Posting Excerpts (9 posts)

  1. smarlin
    Member
    Posted 1 year ago #

    To whom it may concern,

    I am currently using WPP 2.3.2 with theme Mayashop 3.1 and WordPress 3.5.1, trying to style the plugin to include excerpts of our three most popular posts. I've followed the instructions in the FAQs, attempted to modify the excerpt length to 25 characters, but alas I appear to be having no luck. Is there something I'm missing? Any thoughts or suggestions would be appreciated.

    Regards,

    S.M.

    Web Editor - Hothouse

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

  2. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Hi S.M.,

    Are you using the widget or the template tag? If it's the latter, can you please post your code here?

  3. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  4. smarlin
    Member
    Posted 1 year ago #

    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

  5. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  6. smarlin
    Member
    Posted 1 year ago #

    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

  7. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  8. smarlin
    Member
    Posted 1 year ago #

    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

  9. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    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 :P

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic