Title: Adding Themes To Shortcode?
Last modified: August 10, 2023

---

# Adding Themes To Shortcode?

 *  Resolved [DeanSaliba](https://wordpress.org/support/users/deansaliba/)
 * (@deansaliba)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/adding-themes-to-shortcode/)
 * Hi,
 * Is it possible to change the layout as we could with the classic widget? I was
   using the “Tiles” theme and I would like to carry on using it.
 * Can I also remove how many views is shown publicly?
 * Also placing the shortcode into the Text Widget results in ‘>>’ being displayed
   next to each post in the list. I’m not sure if there is a way to remove that.
 * Its a fantastic plugin and I really want to carry on using it.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadding-themes-to-shortcode%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/adding-themes-to-shortcode/#post-16964321)
 * Hi [@deansaliba](https://wordpress.org/support/users/deansaliba/),
 * Yes it’s possible but it’s not as straightforward as using the classic widget(
   the [WordPress Popular Posts block](https://github.com/cabrerahector/wordpress-popular-posts/wiki/1.-Using-WPP-on-posts-&-pages#the-wordpress-popular-posts-block)
   is a direct replacement to the classic widget as it’s as easy to use, but if 
   using blocks isn’t an option for you then yeah you’ll need to use the shortcode
   instead).
 * To replicate the Tiles theme with the [wpp] shortcode use this configuration:
 *     ```wp-block-code
       [wpp range='last24hours' limit=5 stats_views=0 stats_category=1 thumbnail_width=320 thumbnail_height=160 wpp_start='<ul class="wpp-list wpp-tiles">' post_html='<li class="{current_class}">{thumb}<div class="wpp-post-data">{taxonomy} {title}</div></li>' wpp_end='</ul>']
       ```
   
 * The only parameter that you may want to adjust in there is the _range_ parameter.
   It’s the equivalent to the Time Range dropdown from the classic widget. Possible
   values are: _last24hours_, _last7days_, _last30days_, _all_, _custom_ (see P[arameters](https://github.com/cabrerahector/wordpress-popular-posts/wiki/2.-Template-tags#parameters)
   for more details).
 * You will also need to add [these CSS rules](https://raw.githubusercontent.com/cabrerahector/wordpress-popular-posts/master/assets/themes/tiles/style.css)
   to your site (eg. via WP Dashboard > Appearance > Customize > Additional CSS)
   in order for the shortcode to be styled as the Tiles theme.
 * You may need to tweak some things here and there. If you need help with anything
   else please don’t hesitate to reach out again.
 *  Thread Starter [DeanSaliba](https://wordpress.org/support/users/deansaliba/)
 * (@deansaliba)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/adding-themes-to-shortcode/#post-16964528)
 * Thank you very much, that worked. 🙂
 * Is there a way to remove the bullet points from each post on the list? Or is 
   that a theme issue?
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/adding-themes-to-shortcode/#post-16965475)
 * Hmm, your popular posts list seems a bit broken for some reason. Could you please
   take a screenshot of your Text widget (Appearance > Widgets > [Your Sidebar])
   and share it here?
 *  Thread Starter [DeanSaliba](https://wordpress.org/support/users/deansaliba/)
 * (@deansaliba)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/adding-themes-to-shortcode/#post-16966817)
 * Hi,
 * I have attached the screenshot. I don’t know if this is anything to do with it,
   but when I reload the Widgets page the Text widget will display the ‘Visual’ 
   tab by default.
 * ![](https://i0.wp.com/deansaliba.com/wp-content/uploads/2023/08/2.png?ssl=1)
    -  This reply was modified 2 years, 10 months ago by [DeanSaliba](https://wordpress.org/support/users/deansaliba/).
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/adding-themes-to-shortcode/#post-16966908)
 * Ah, my old friend Visual tab and its tendency to mangle shortcodes with HTML 
   code. Had completely forgotten about that…
 * Alright, here’s an alternative that seems to work fine. Follow the same steps
   as before but instead of using the Text widget switch to the Custom HTML widget,
   then please add the following line of code to your site either via your theme’s
   functions.php file or via the [Code Snippets](https://wordpress.org/plugins/code-snippets/)
   plugin for example:
 *     ```wp-block-code
       add_filter( 'widget_text', 'do_shortcode');
       ```
   
 * If everything went well your popular posts list should render now as expected(
   not broken haha). Once you’ve confirmed that please let me know if you’re still
   seeing those bullets and I’ll have another look.
 *  Thread Starter [DeanSaliba](https://wordpress.org/support/users/deansaliba/)
 * (@deansaliba)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/adding-themes-to-shortcode/#post-16966954)
 * Hi,
 * The bullet points have gone, but there is now a >> symbol instead. Could this
   be a theme issue?
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/adding-themes-to-shortcode/#post-16966974)
 * Yep, that is coming from your theme and it’s easy to fix. Remember [the CSS rules from before](https://wordpress.org/support/topic/adding-themes-to-shortcode/#post-16964321)?
   Find this:
 *     ```wp-block-code
           .wpp-tiles li {
               position: relative;
               list-style: none;
               margin: 0 0 1.2em 0;
               padding: 0;
           }
       ```
   
 * and change it to:
 *     ```wp-block-code
           .wpp-tiles li {
               position: relative;
               list-style: none;
               margin: 0 0 1.2em 0;
               padding: 0 !important;
           }
       ```
   
 * and to remove that >> symbol, add this:
 *     ```wp-block-code
           .wpp-tiles li::before {
               display: none !important;
           }
       ```
   
 *  Thread Starter [DeanSaliba](https://wordpress.org/support/users/deansaliba/)
 * (@deansaliba)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/adding-themes-to-shortcode/#post-16967264)
 * Thank you very much! Everything seems to be working perfectly now. 🙂

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

The topic ‘Adding Themes To Shortcode?’ 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/)

 * 8 replies
 * 2 participants
 * Last reply from: [DeanSaliba](https://wordpress.org/support/users/deansaliba/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/adding-themes-to-shortcode/#post-16967264)
 * Status: resolved