|
The best course of action for you would be to create and add a custom plugin to your website to add this shortcode. While you can add shortcodes to your theme, if you're publishing your site with an AMP plugin, those shortcodes won't render. If you add them to your own plugin, they will render on AMP pages.
Click : UK mobile number database
The function will subtract the current year from the year you pass, or use the date you enter in this code as the default. In this case, I used the date of the first published post on Martech Zone.
Get More Info click here :
Martech Zone has been published for over 18 years!
This shortcode will calculate the number of years from this date. As an example, if I wanted to write how many years ago my birthday was, I would write:
The result is:
Douglas Carr is 55 years old!
Of course, you can get a lot more complicated with this type of shortcode... you can use HTML, images, CSS, etc., but this is just a simple example of how to make sure your site is already accurate!
How to wrap it in your own plugin
I would recommend creating a custom plugin for your website that will include all your shortcodes, even the ones included in your theme. Do this:
Create a folder with a unique name. For example, ours is called mtz-shortcodes.
|
|