Title: Customize Top Posts Widget
Last modified: September 19, 2019

---

# Customize Top Posts Widget

 *  Resolved [SantaCruze](https://wordpress.org/support/users/santacruze/)
 * (@santacruze)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/customize-top-posts-widget/)
 * 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 Contributor [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * (@coolmann)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/customize-top-posts-widget/#post-11950190)
 * 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](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](https://wordpress.org/support/users/santacruze/)
 * (@santacruze)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/customize-top-posts-widget/#post-11950492)
 * 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 6 years, 7 months ago by [SantaCruze](https://wordpress.org/support/users/santacruze/).
    -  This reply was modified 6 years, 7 months ago by [SantaCruze](https://wordpress.org/support/users/santacruze/).
 *  Plugin Contributor [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * (@coolmann)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/customize-top-posts-widget/#post-11950522)
 * 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](https://wordpress.org/support/users/santacruze/)
 * (@santacruze)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/customize-top-posts-widget/#post-11951404)
 * 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 Contributor [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * (@coolmann)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/customize-top-posts-widget/#post-11952606)
 * 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 6 years, 7 months ago by [Jason Crouse](https://wordpress.org/support/users/coolmann/).
 *  Thread Starter [SantaCruze](https://wordpress.org/support/users/santacruze/)
 * (@santacruze)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/customize-top-posts-widget/#post-11958127)
 * Hey Jason,
 * Sorry for the late reply. It works like a charm. Thanks for the help.
 * Sincerely,
 * Stefan
 *  Plugin Contributor [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * (@coolmann)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/customize-top-posts-widget/#post-11958281)
 * 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.

 * ![](https://ps.w.org/wp-slimstat/assets/icon.svg?rev=2832242)
 * [SlimStat Analytics](https://wordpress.org/plugins/wp-slimstat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-slimstat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-slimstat/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-slimstat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-slimstat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-slimstat/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/customize-top-posts-widget/#post-11958281)
 * Status: resolved