• Resolved hing02

    (@hing02)


    Any way to use php or shortcode to call the WPP Widget ? I have a mobile theme , which use optimized for AMP and mobile use, in order to keep the best speed, it will take all the widget out. The only way to insert the widget is put the php/shortcode in the footer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter hing02

    (@hing02)

    I’ve try adding shortcode, it can work, but without thumbnail. How can I use shortcode to display just like widget with thumbnail?

    [wpp range=’custom’ time_unit=’HOUR’ time_quantity=1 order_by=’views’ stats_comments=1 wpp_start=’

      ‘ wpp_end=’

    ‘]

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @hing02,

    I’m sure there’s a way to do this but personally I have never attempted it. Maybe someone else reading this might be able to help.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Oh, I skipped your second comment!

    To have the shortcode display the post thumbnails you must set the width & height of the images using the thumbnail_width and thumbnail_height parameters.

    For example:

    [wpp thumbnail_width=100 thumbnail_height=75 post_html='<li>{thumb} <a href="{url}">{text_title}</a></li>']

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

The topic ‘Call WPP Widget by using PHP’ is closed to new replies.