Support » Plugin: WordPress Popular Posts » Trying to Determine 10 Top Posts for the Year

  • Resolved mommyhon333

    (@mommyhon333)


    Hi! I have just installed your plug-in but not sure what more I need to do in order to get the top posts on my blog by page views for 2018. I am able to see a report for the posts with the most comments but when I put in the parameters for the year…beginning 01.01.2018-12.28.2018, I still just see the posts with the greatest number of comments or the posts viewed today.

    I am not very experienced with HTML. Perhaps there is something I need to do in the header or footer code to be able to pull up this report?

    Appreciate any and all help.
    Thank you and happy new year!

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Héctor Cabrera

    (@hcabrera)

    Hi @mommyhon333,

    If you just installed the plugin WPP doesn’t have enough views data yet to display your most viewed posts of the year. Please read here for more details:

    If you want to rank your top posts of the year by comments count then it is possible, however this is a feature not included with the plugin so you’d need to mess around with code a bit to get this working. I’d help you with the coding part if you’re insterested but I’m away on vacations and won’t be back home for a few more days.

    Thank you, Hector, for the quick response. Enjoy your vacation and then I would appreciate the help.

    As I understand it, WPP will enable me to count my most popular pages my views for 2019 since I have it installed now.

    Thank you!!

    Plugin Author Héctor Cabrera

    (@hcabrera)

    Hi @mommyhon333,

    I’m finally back home and just now had some fun playing around with this.

    Alright, assuming you want to display your Top Viewed Posts of 2018 on a page or a post, please put this code somewhere inside your theme’s functions.php (how-to, also you’ll likely want to omit the initial <?php line) and then place the following shortcode wherever you want to display your top posts from 2018:

    [wpp_top_viewed_posts_from year=2018]

    Keep in mind that this code snippet requires PHP 5.3 or newer to work. You can check which PHP version your site uses by visiting the URL:

    https://www.your-domain-name.com/wp-admin/options-general.php?page=wordpress-popular-posts&tab=debug

    (Remember to replace https://www.your-domain-name.com/ with your actual domain name.)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trying to Determine 10 Top Posts for the Year’ is closed to new replies.