Instead, as soon as you activate the plugin, it starts functioning.Here’s what it looks like after you activate the plugin: The only potential downside of this plugin is that it shows the last updated date no matter what.Note If you run into a problem you can't resolve, download the completed chapter and try to reproduce your problem.You can generally find the solution to the problem by comparing your code to the completed code.For example, if you input something like this on the backend……it will look like this on the frontend of your site: For another code-free option, there’s a free plugin called Post Updated Date.Unlike the plugin from the previous section, there aren’t any shortcodes involved with this plugin.To get around the Daylight Savings Time bug above, you can use PHP to use the server to calculate the timezone offset and automatically adjust for DST if necessary.However, this does require that the server/page supports PHP (if you aren't sure, it probably does not support PHP).
You can start the tutorial series from the beginning or download a starter project for this chapter and start here.
I’ll show you a few different methods using both code and plugins. This is a good approach because it shows the age of your post, while also letting readers know that you’ve recently updated it.
To use this method, all you need to do is add a code snippet to your Word Press site.
While you can always add this code snippet directly to the file in your child theme, I recommend using the free Code Snippets plugin because it makes it easier to keep track of things later on.
It also ensures, if you ever switch themes, that your new theme will continue to display the last modified date.