| 开发者 | bitnulleins |
|---|---|
| 更新时间 | 2026年10月12日 04:24 |
| PHP版本: | 5.2.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[statify-count] can be used to display calls to the current post or page. With the options "prefix" and "suffix" displayed texts can be checked before (prefix) and after (suffix) the calls:
[statify-count prefix="Total " suffix=" calls." days="8"]
Parameter:
prefix Sentence before viewssuffix Sentence after viewsdays Inteval for view statisticsStatify has not added statistics yet. Wait some days to collect some statistics by Statify.
Yes! Since 1.4.1 you can add the following filter to change the default 4 minute cache (60 * 4) to another value in seconds:
add_filter( 'statify_targets_cache_expiry', fn() => 60*4 );
If you do not set a numerical value greater than zero (>0), the standard cache expiry time is automatically used.
If you deactivate the plugin, all existing cache will be delete. After that you can activate Statify Widget again. Everything continues to work as usual.
Yes! Since 1.1.4 that works. Just in the content type widget: select Pages and posts. He then displays the default content types "post" and "page" together.
This is possible with shortcodes. Specifying a prefix and suffix is not mandatory: Properties:
days = Amount of daysprefix= Text before the view countsuffix= Text after the view count[statify-count prefix ="Total" suffix ="calls." days="8"]
The total view counter for the whole webpage:
[statify-count-sum prefix="Total" suffix="calls."]
No problem. A pseudo "Frontpage" (with views) entry appears.
This changes nothing. The plugin takes every Statify entry and adds it together.
Just use these CSS classes:
.statify-widget-list {...}.statify-widget-element {...}.statify-widget-element span {...}.statify-widget-link {...}If you want to change the list of contents (1st, 2nd, 3rd, ...) to bullets, just add the following to your CSS:
.statify-widget-element { list-style-type: circle; }
Since 1.3.8 it is possible to customize the Widget Template by adding code to your Template functions.php. You can use the WP Post Object in the template.
There exists two hooks:
statify_widget_before_linkstatify_widget_after_linkFor example put this in your theme: ` have_posts() ) { $ wp_query->the_post(); } } ?> ` Properties
$days = Range of days for statictics (0 = all days)$amount = Amount of posts$post_type = Post type ("post", "page", ...)$post_category = Category of the post, if post type is choosen<ol> or <ul>) per widget.statify-widget-list,statify-widget-element and statify-widget-link have been added as class to make a more flexible design possible.<ol>) changed to unordered (<ul>) for higher theme compatibility.