Support » Plugin: WordPress Popular Posts » [Plugin] wpp_get_mostpopular; pattern_form parsing issue

  • Resolved zeshark


    Very cool plugin, trying to get it to work for me. My goal is to display most popular posts as thumbnails only in our theme.

    I am using the following line:
    <?php wpp_get_mostpopular("range=monthly&order_by=views&limit=5&post_type=post&thumbnail_width=200&stats_comments=0&do_pattern=1&pattern_form="{image}""); ?>
    but I get a parsing error on the { and I do not understand why.
    Help much appreciated !

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


    Hi zeshark,

    You made a mistake in your code. Replace the double quotes in pattern_form="{image}" with single quotes. It should be:

    <?php wpp_get_mostpopular("range=monthly&order_by=views&limit=5&post_type=post&thumbnail_width=200&stats_comments=0&do_pattern=1&pattern_form='{image}'"); ?>

    Many thanks for your reply, I will try that.
    I was reading off the FAQ tab on the plugin config in WordPress, they do say:

    pattern_form=”{image} {title}: {summary} {stats}”

    You may want to put this on your list of mods for the next release.

    Plugin Author Hector Cabrera


    The info in the FAQ is correct. However, in PHP when using double quotes in a string and you want to add another string in it you need to use single quotes. That’s why it was causing the error. I will update the FAQ to correct the double quotes, though.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin] wpp_get_mostpopular; pattern_form parsing issue’ is closed to new replies.