WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
"Hall of Fame" Page just for 1 category - how? (6 posts)

  1. DjMG
    Member
    Posted 2 years ago #

    Hi guys!

    I'm using WordPress Popular Posts Plugin on my Blog.
    But i don't want to use it as a widget, but on a blogroll/page.

    Therefore, i found this PHP-snippet like this:
    <?php if (function_exists('get_mostpopular')) get_mostpopular("range=all&limit=10&order_by='views'&thumbnail_width=50&thumbnail_height=50&title_length=25"); ?>

    That's working so far, but, i want to:
    - display the most-viewed articles just from ONE categorie. How can i do that?
    - is there any chance, to style this simple list? Each result in one div-box for example?

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

  2. Héctor Cabrera
    Member
    Plugin Author

    Posted 2 years ago #

    Hi DjMG,

    1. Currently, the plugin doesn't have this kind of functionality. Might be included on next releases, so there's no way to achieve that without hacking WPP's code.

    2. Yep. WPP can let you use your own custom HTML markup using some extra parameters, for example:

    <?php if (function_exists('get_mostpopular')) get_mostpopular("range=all&limit=10&order_by='views'&thumbnail_width=50&thumbnail_height=50&title_length=25&wpp_start='<div class=\"my-popular-posts\">'&wpp_end='</div>'&post_start='<div>'&post_end='</div>'"); ?>

    ...would output something like:

    <div class="my-popular-posts">
        <div>
        	<a href="http://someurl.com/photography/loremipsum/" title="Lorem Ipsum"><img width="50" height="50" src="http://someurl.com/wp-content/uploads/tdomf/5980/donquijote-150x150.gif" class="wpp-thumbnail wp-post-image" alt="Lorem Ipsum" title="Lorem Ipsum"></a>
            <a href="http://someurl.com/photography/loremipsum/" title="Lorem Ipsum"><span class="wpp-post-title">Lorem Ipsum</span></a>
            <span class="post-stats"><span class="wpp-comments">37 comment(s)</span></span>
        </div>
    </div>
  3. joesox
    Member
    Posted 2 years ago #

    Hi Hector

    I also have this same idea. I know little about actual coding, but so far I have gotten the posts to show on the page I want them on, using the [wpp] shortcode.

    I want to know how to style those results to look like the sidebar. Have a look here at http://www.socialyz.com/trending

    You will see I have the posts in the page but they are just one line without thumbnails etc. If you scroll all the way down on the right you will see the widget for WordPress Popular Posts. I had to add the widget to do the settings, do I always have to have the widget AND the page showing?.

  4. Héctor Cabrera
    Member
    Plugin Author

    Posted 2 years ago #

    Hi guys,

    I spent the past weekend working on the plugin and one of the things I did was to create a filter to let the user get posts from one or more categories.

    Currently I'm testing this and everything looks good so far. There are a few adjustments / new features I want to add, and will release a beta version when I'm done.

    Maybe you guys want to help test it out?

  5. jimbocook
    Member
    Posted 2 years ago #

    I'd be happy to help out with testing

  6. Héctor Cabrera
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Jimbo,

    Here I posted a development version for testing.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic