• Resolved itiketinifaktai

    (@itiketinifaktai)


    Hi there,

    We currently use the widget and we have the ‘The WordPress Popular Posts classic widget is going away’ message.

    How would we create a shortcode to look and work like what we have already? I’ve included the link to what we have already.

    Any help would be much appreciated.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @itiketinifaktai,

    Looks like you’re using the Tiles theme with your popular posts list so please follow these instructions:

    #1 Add a Custom HTML widget to your sidebar.

    #2 Paste the following shortcode inside the Custom HTML widget:

    [wpp range='last24hours' limit=3 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 Parameters for more details).

    #3 Add these CSS rules to your site (eg. via WP Dashboard > Appearance > Customize > Additional CSS) in order for the shortcode to be styled as the Tiles theme.

    #4 Add this line of code to your site, either via your theme’s functions.php or by using a plugin such as Code Snippets for example:

    add_filter( 'widget_text', 'do_shortcode');

    If you have any further questions please let me know.

    Thread Starter itiketinifaktai

    (@itiketinifaktai)

    Thank you @hcabrera I made it. Its work fine and no error anymore. And now like i understand we can work in future without problems? ??

    Plugin Author Hector Cabrera

    (@hcabrera)

    Yep, that’s correct. Your popular posts list will continue to work for as long as possible ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to create a shortcode to replace classic widget’ is closed to new replies.