开发者 | sippis |
---|---|
更新时间 | 2018年10月21日 02:51 |
PHP版本: | 5.2.4 及以上 |
WordPress版本: | 4.9.8 |
版权: | GPLv3 |
版权网址: | 版权信息 |
the_content
output if deadline is set. List of posts with upcoming deadlines are cached to transients to reduce amount of databse queries in large scale sites.
Post deadline can be set via datepicker in classic editor or Gutenberg from meta box labeled "Post deadline". If you are running P2 theme or o2 plugin, deadline can be set from datepicker in front end post submit area also.
Just use shortcode [upcoming_post_deadlines]
somewhere in your content! If you want to change the order so that post with latest deadline is first, add attribute order="DESC"
to shortcode.
Yes! From plugin files copy views/shortcode-list-upcoming-deadlines-php
to your theme root with name post-deadlines-shortcode-list-upcoming.php
and then just modify the template to suit your needs.
Oh snap! Plugin stores upcoming deadlines in transients to reduce amount of databse queries in large scale sites. Probably something is stuck and you should manually delete those transients from wp_options
table or in-memory cache like Redis.
Transient are named like posts_with_deadline_YYYYMMDD_ASC/DESC
.
Of course, but it needs some basic knowledge about PHP and WordPress hooks. This plugin does not have any settings page, only thing you can do without touching the code is chaning the post order in shortcode.
If you know your PHP and WordPress hooks, look throught post-deadlines.php
file and find what you need :)