WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin] wpp_get_mostpopular; pattern_form parsing issue

[Resolved] [Plugin] wpp_get_mostpopular; pattern_form parsing issue

  • Hi,
    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 !

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

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

    @hcabrera

    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

    @hcabrera

    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 ‘[Resolved] [Plugin] wpp_get_mostpopular; pattern_form parsing issue’ is closed to new replies.