跳到内容

Inaikas Posts Widget

v1.0.0

Mohammed Abdellaoui · 2026年11月8日 上架

A widget and a shortcode that show the latest posts or the best posts (most viewed or most commented).

正在使用
10 以下
评分
暂无
累计下载
220
最近更新
2026年11月8日
需要 WordPress 5.8+已测试到 7.1.5PHP 7.4+

Add a list of posts to a sidebar, or place the same list anywhere with a shortcode.

  • Choose latest posts or best posts.
  • Rank best posts by views or by comment count.
  • Set the number of posts (1 to 12) and how many posts fit in one row (1 to 4).
  • Filter by category.
  • Show or hide the featured image, date and comment count.
  • Hide the post that is currently being viewed.

The widget prints nothing when no posts match, so it never leaves an empty box.

Shortcode

The same list can be placed in a post, a page, or an Elementor shortcode widget.
The widget form shows a ready example built from its current settings.

[tdd_posts]

[tdd_posts source="best" count="6"]

[tdd_posts source="best" best_by="comments" count="6"]

[tdd_posts source="latest" count="8" columns="3" category="recipes"]

[tdd_posts source="best" count="4" columns="2" title="Popular Recipes" show_comments="0"]

Attributes:

  • title – optional heading above the list.
  • source – latest or best. Default latest.
  • best_by – views or comments. Default views. Only used with source="best".
  • count – number of posts, 1 to 12. Default 6.
  • columns – posts per row, 1 to 4. Default 1.
  • category – category ID or slug. Empty means all categories.
  • show_thumbnail – 1 or 0. Default 1.
  • show_date – 1 or 0. Default 1.
  • show_comments – 1 or 0. Default 1.
  • exclude_current – hide the post being viewed, 1 or 0. Default 1.
  • heading_level – heading tag for title, 2 to 6. Default 2.
  • class – extra CSS class on the shortcode wrapper.

Privacy

When a visitor opens a single post, the plugin adds one to that post’s view
counter and stores the total number of views for each post.

To ignore repeated visits, the plugin keeps a keyed hash of the visitor IP
address (not the raw address) for 30 minutes in a temporary option. The hash
cannot be turned back into an address, and it is removed automatically when the
30-minute window ends. The plugin does not send data to any external service.

View counting can be disabled with the tdd_posts_widget_count_views filter.
Suggested privacy policy text is also available in Settings Privacy Policy
Guide
.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums