• Resolved SantaCruze

    (@santacruze)


    Heya there,

    I started to use Slimstat yesterday on two of my Blogs. Configuration and Setup was no problem at all, nice work.

    I do have a problem with the Sidebar Widget. I want to Show the Top Blogposts per day. I used the “Top Article” Widget with this Shortcode:

    [slimstat f=’top’ w=’resource’ lc=’post_link’]content_type equals post&&&limit_results equals 5 [/slimstat]

    Ive two problems with it which iam not able to figure out. First it still shows me the % of Hits. I would like to remove that. Also i cant figure out how to link the output to the Posts itself. I thought that ‘post_link’ would do the trick but its not working.

    Sincerely

    Stefan

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jason Crouse

    (@coolmann)

    Hi, why not use the built-in Slimstat Widget, instead of the shortcode? If you prefer the shortcode, please take a look at our knowledge base:

    https://slimstat.freshdesk.com/a/solutions/articles/5000631833

    In your case, you would have

    [slimstat f=’top’ w=’post_link_no_qs’]content_type equals post&&&strtotime equals today&&&limit_results equals 5[/slimstat]

    Notice:

    • post_link_no_qs will omit the query string from the post URLs
    • strtotime will retrieve only pageviews for the current day (based on your local WP’s date and time settings)
    • the ‘lc’ parameter was deprecated A LONG time ago

    I hope this helps,
    Jason

    Thread Starter SantaCruze

    (@santacruze)

    Hey Jason,

    Thanks for the Support. Yeah i got that code from some other Forum Posts which i tried first. I also tried the build-in Widget. But the “Top Article” Widget didnt Linked to the Postings and i couldnt remove the % Info.

    I will try your new code tomorrow.

    Sincerely
    Stefan

    PS: Is there also a Syntax for Week / Weekly? In the Shortcode FAQ its just splitted in day and month.

    • This reply was modified 5 years, 5 months ago by SantaCruze.
    • This reply was modified 5 years, 5 months ago by SantaCruze.
    Plugin Author Jason Crouse

    (@coolmann)

    Hi, you can hide the % info by adding a few lines to your CSS. Could you please elaborate on what you mean by “weekly”? Past week?

    Thread Starter SantaCruze

    (@santacruze)

    Hey Jason,

    Under the Topic “Special Filters” are listed day, month, year. I think thats for the time range if iam correct. There is “week” missing for showing like a 7 day range. Or is it supposed to be that way?

    Sincerely
    Stefan

    Plugin Author Jason Crouse

    (@coolmann)

    Hi Stefan,

    the way date filters work in Slimstat is by setting a start date (day/month/year) and an interval (plus/minus X days/hours) to set a time range. So, if you want to see today’s pageviews, you would set today’s date (that’s what strtotime does for you, in the shortcode) and no interval (default = 1). If you want to see the past seven days’ worth of data, you would set today’s date (via strtotime), and interval = -7. I hope this makes sense:

    [slimstat f='top' w='post_link_no_qs']content_type equals post&&&strtotime equals today&&&interval equals -7&&&limit_results equals 5[/slimstat]

    Jason

    • This reply was modified 5 years, 5 months ago by Jason Crouse.
    Thread Starter SantaCruze

    (@santacruze)

    Hey Jason,

    Sorry for the late reply. It works like a charm. Thanks for the help.

    Sincerely,

    Stefan

    Plugin Author Jason Crouse

    (@coolmann)

    Great! I hope you will consider leaving a review for Slimstat!

    Best,
    Jason

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Customize Top Posts Widget’ is closed to new replies.