| 开发者 |
latinovic
ljiljau |
|---|---|
| 更新时间 | 2018年11月3日 19:12 |
| 捐献地址: | 去捐款 |
| PHP版本: | 3.5 及以上 |
| WordPress版本: | 4.9.8 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/wp-content/plugins/plugin-name directory, or install the plugin through the WordPress plugins screen directly.Use this shortcode to preview current date anywhere in your content, and format it as you prefer.
For example, create logic that will print some content specifically on 7th April, year 2016. We will use wpch-ifdate shortcode with date attribute. Format of date attribute must be yyyy/mm/dd, so our date entry will be "2016/04/07", and short code will look like this. [wpch-ifdate date="2016/04/07"]This is content that will be printed only on 7th April, year 2016. This content supports all WP editor native functions, so what you see if what you get. [else]This is part of the content that will be printed if day is not 7th April, so before or after it! :)[/wpch-ifdate]
Example shortcode use for date ranges between 1st April and 10th April of 2016. [wpch-ifdaterange fromdate="2016/04/01" todate="2016/04/10" ]This is content that will be printed only for range 1st to 10th April, year 2016. This content supports all WP editor native functions, so what you see if what you get.[else]This is part of the content that will be printed if day is not within a given range.[/wpch-ifdaterange] Example shortcode use for date ranges between 1st March and 10th March of 2016. [wpch-ifdaterange fromdate="2016/03/01" todate="2017/05/17"] This copy will be printed if range is between 2016/03/01 and 2017/05/17 :) :) YAY! For, example, we have some promo codes, which changes from day to day: [wpch-ifdate date="2016/04/20"]Promo code for today is: MyPromoCode-001[/wpch-ifdate] [wpch-ifdate date="2016/04/21"]Promo code for today is: MyPromoCode-002[/wpch-ifdate] [wpch-ifdate date="2016/04/22"]Promo code for today is: MyPromoCode-003[/wpch-ifdate] [wpch-ifdate date="2016/04/23"]Promo code for today is: MyPromoCode-004[/wpch-ifdate] [wpch-ifdate date="2016/04/24"]Promo code for today is: MyPromoCode-005[/wpch-ifdate] [else] This is part of the content that will be printed if day is not within a given range. [/wpch-ifdaterange]
Use one of predefined templates to quickly create light weight CountDown timer, using this shortcode: [wpch-countdowntimer name="first" date="25 Dec 2018 13:30:00 GMT" template="darkblue"] This is content that will be previewed after counter finished countdown. Note: This content in CSS hidden, so it's visible inside code at client side. [/wpch-countdowntimer]