How to add dynamic content in WordPress post?

I have developed a plugin to display dynamic content on WordPress post just by setting values from the WP Editor area.

Learn how to add dynamic post content in a WordPress blog.

dynamic-wordpress-post-content

This method can help to automate your blog content.


How to add dynamic content in WordPress post?

Example: Suppose a blog post contains “2015” as the value (say).

Now, it should be displayed as “4” in the year 2019 (i.e. 2019-2015 = 4) and that of  “5” in 2020 (i.e. 2020-2015 = 5).

In other words, the final number (result printed) is the total duration from the current year to the value set.

I have checked and implemented the solution for the above example.


From Year: 2015

To Current Year: [year]

Result/Duration:  [rxpnum targetyear=2015]


From Year: 2016

To Current Year: [year]

Result/Duration:  [rxpnum targetyear=2016]


From Year: 2017

To Current Year: [year]

Result/Duration:  [rxpnum targetyear=2017]


From Year: 2018

To Current Year: [year]

Result/Duration:  [rxpnum targetyear=2018]


 

Rabins Sharma Lamichhane

Rabins Sharma Lamichhane is senior ICT professional who talks about #it, #cloud, #servers, #software, and #innovation. Rabins is also the first initiator of Digital Nepal. Facebook: rabinsxp Instagram: rabinsxp

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *