• Resolved alevith

    (@alevith)


    I seem to be having issues with the template tag range attribute.

    This is the code i am using in my template:
    wpp_get_mostpopular(‘limit=3, range=”monthly”, post_type=”post”‘);

    If i change the range to anything, it only shows daily. I read through other posts, but couldn’t find a resolution for the template tags.

    I don’t have a URL to show because the project is under a password protected area.

    Are you having similar issues or did i write this template tag incorrectly?

    Thank you
    Aaron

    https://wordpress.org/plugins/wordpress-popular-posts/

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

    (@hcabrera)

    Hi Aaron,

    The way you’re passing the parameters to the function isn’t correct. That would work with the [wpp] shortcode, but not with the wpp_get_mostpopular() template tag.

    Try the following instead:

    <?php
    if ( function_exists('wpp_get_mostpopular') ) {
        wpp_get_mostpopular('limit=3&range="monthly"&post_type="post"');
    }
    ?>

    See how the parameters are separated with & instead of spaces/commas?

    Thread Starter alevith

    (@alevith)

    Perfect! Thanks for the help and doc references.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘template tag range’ is closed to new replies.