WordPress Popular Posts
[Plugin: WordPress Popular Posts] How to customize layout (5 posts)

  1. carletto0282
    Posted 3 years ago #

    Hi everybody.

    Thanks Hector for your great work with this plugin it's just awesome.
    I really appreciate your last upgrade that includes custom post types support!

    I'd like to ask you some information about customizing layout.

    Since I'm using WP TYPES and VIEWS to manage custom post types and layout I massively use shortcodes from this plugin to recall my post informations like custom field linked images or metadata.

    Is there a way to pass a fully customized html/php layout to your plugin's query?

    It's the same thing I do - i.e. - with other plugins like "posts 2 posts".



  2. carletto0282
    Posted 3 years ago #

    Actually my needs are to manipulate the template of a single element of the query a little deeper than I could with the available tags.

    Since I had to literally build the image url trough shortcode with something like:

    http://domain.xyz/multimedia/image custom field]

    maybe could be useful to be able to add more pattern elements.
    Is there a way to do that?

    Thanks in advance
    Keep up the good work!


  3. Hector Cabrera
    Plugin Author

    Posted 3 years ago #

    Hi Carlo,

    You should be able to arrange the HTML output by using the wpp_start, wpp_end, post_start, post_end properties with your shortcodes.

    I am aware that this is a little limited at the moment, and I do plan to make this more flexible on future versions. I'll take a look at that plugin you mentioned, maybe I could grab some ideas from it.

  4. carletto0282
    Posted 3 years ago #

    Hi Hector,

    thanks for your answer, I will try something... or I will wait until next plugin upgrade!

    Anyway here you find how the plugin I was talking about works... hope it could help!


    Thanks again!

  5. carletto0282
    Posted 3 years ago #

    Hi Hector,

    I'm sorry to bother but I'm trying to do what you said and I'm getting weird results.

    I'm trying to load wpp_get_mostpopular function trough a shortcode to easily manage the parameters.

    Actually if I try something like this

    $content = '<li>'


    'limit' 	=> 5,
    'range' 	=> 'monthly',
    'order_by'	=> 'views',
    'post_type'	=> 'shows',
    'stats_views'=> 0,
    'stats_comments'=> 0,
    'post_start' => $content,
    'post_end' 	=> '</li>',

    but if I try

    $content = '<li class="customclass">'

    I always get

  6. ...

    I tried with <p> and I get the same result.
    It works alone but not customized.

    How I was supposed to customize my layout?

    Thanks and regards mate.


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic