跳到内容

Super Recent Posts Widget

v0.3.0

Mat Gargano · 2014年1月23日 上架

Drag and drop the widget and fill out the appropriate fields. Some notes:

正在使用
40+
评分
5.0 / 5
累计下载
6,545
最近更新
2020年1月22日
2 条评价需要 WordPress 3.6+已测试到 5.3.28

截图

Screenshot of widget
Screenshot of widget

Drag and drop the widget and fill out the appropriate fields. Some notes:

To display posts from a specific post type leave Taxonomy as “– No Specific Taxonomy –“

If you leave order by and/or order as “– Choose order parameter –” and/or “– Choose orderby parameter –” it will go with WordPress’ default(s), see here for more information.

The following filters are available:

  • srpw_get_args to override arguments of main query for the widget.
  • srpw_template to override the output template for the widget, see below for more information.
  • srpw_WIDGET_NAME_template to override the output template for the widget on a widget by widget basis, the WIDGET_NAME appears on the back-end in the widgets window see below for more information.
  • widget_title this is a WordPress core filter see here for more information.
  • srpw_post_types to override the post types available for this widget.
  • srpw_taxonomies to override the taxonomies available for this widget.

Usage of srpw_template filter

Add a “views” directory and file named “custom-srpw.php” to your template directory. The “custom-srpw.php” file will be your custom template for this example.

Example of using a custom template from within your theme pre-PHP 5.3

    <?php

        function customize_srpw_template_filter( $template ){
            $template_dir = get_template_directory();
            return $template_dir . '/views/custom-srpw.php';
        }
        add_filter( 'srpw_template', 'customize_srpw_template_filter' );
        ?>

Example of using a custom template from within your theme PHP 5.3+ which allows anonymous functions

    <?php

        add_filter( 'srpw_template', function ( $template ){
            $template_dir = get_template_directory();
            return $template_dir . '/views/custom-srpw.php';
        } );
        ?>

Grunt

This plugin takes advantage of Grunt for validating JavaScript, SASS compilation and minification. To take advantage of Grunt you have to have both npm and Grunt installed. Visit the respective sites for the applications and make sure they are installed. Once installed, if you want to edit/fork this plugin, it will be helpful to be familiar with these two tools.

Plums

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

导航

说明

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

© 2026 Plums