Title: [Plugin: WordPress Popular Posts] How to customize layout
Last modified: August 20, 2016

---

# [Plugin: WordPress Popular Posts] How to customize layout

 *  [Carloalberto Fornea](https://wordpress.org/support/users/carletto0282/)
 * (@carletto0282)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-customize-layout/)
 * 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”.
 * Thanks
 * [http://wordpress.org/extend/plugins/wordpress-popular-posts/](http://wordpress.org/extend/plugins/wordpress-popular-posts/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [Carloalberto Fornea](https://wordpress.org/support/users/carletto0282/)
 * (@carletto0282)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-customize-layout/#post-3018598)
 * 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/%5Bimage](http://domain.xyz/multimedia/%5Bimage)
   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! Regards
 * Carlo
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-customize-layout/#post-3018780)
 * 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.
 *  Thread Starter [Carloalberto Fornea](https://wordpress.org/support/users/carletto0282/)
 * (@carletto0282)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-customize-layout/#post-3018781)
 * 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!
 * [https://github.com/scribu/wp-posts-to-posts/wiki/Actions-and-filters](https://github.com/scribu/wp-posts-to-posts/wiki/Actions-and-filters)
 * Thanks again!
    Bye Carlo
 *  Thread Starter [Carloalberto Fornea](https://wordpress.org/support/users/carletto0282/)
 * (@carletto0282)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-customize-layout/#post-3018782)
 * 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>'`
 * …
 *     ```
       wpp_get_mostpopular(array(
       '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
    - …
    - 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.
    - Carlo

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: WordPress Popular Posts] How to customize layout’ is closed 
to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

## Tags

 * [custom layout](https://wordpress.org/support/topic-tag/custom-layout/)
 * [layout](https://wordpress.org/support/topic-tag/layout/)

 * 4 replies
 * 2 participants
 * Last reply from: [Carloalberto Fornea](https://wordpress.org/support/users/carletto0282/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-how-to-customize-layout/#post-3018782)
 * Status: not resolved