开发者 |
afazza
eraplugins ramielhabashy |
---|---|
更新时间 | 2024年8月28日 02:58 |
PHP版本: | 4.0 及以上 |
WordPress版本: | 6.5.5 |
版权: | GPLv2 |
版权网址: | 版权信息 |
[recent-posts]
You can also customize the shortcode by adding attributes, like this:
[recent-posts limit="10" image_size="medium" post_type="page" category="news" order="ASC" meta_limit="30"]
To learn more about this plugin and its features, please visit our plugin page.
[recent-posts]
This will display the 5 most recent posts with thumbnails and meta descriptions.
You can also customize the shortcode by adding attributes. Here are the available attributes:
limit
- The maximum number of posts to display (default is 5)image_size
- The size of the thumbnail image (default is "thumbnail")post_type
- The post type to display (default is "post")category
- The category to display (default is empty)order
- The sort order of the posts (default is "DESC")meta_limit
- The maximum length of the meta description (default is 15)
For example, to display the 10 most recent pages in the "news" category with medium-sized thumbnails and longer meta descriptions, you would use the following shortcode:[recent-posts limit="10" image_size="medium" post_type="page" category="news" order="ASC" meta_limit="30"]
You can customize the output by adding attributes to the shortcode. See the "Usage" section for a list of available attributes.
Yes, you can use the do_shortcode() function to embed the shortcode in a widget or a theme file. For example, you could use the following code in a widget or a template file: