This tutorial provides 3 different solutions which enable you to change the post date for each individual post in Genesis child themes.
- The 1st solution uses the ACF plugin which adds a True/False button to the Edit Post admin screen on every single post/page that looks like this –
- The 2nd solution enables you to use WordPress custom fields with PHP code.
- The 3rd solution provides the code in a separate download folder which adds a checkbox.
Shows a single post date updated to the current date using the True/False button added to the edit post screen
Tested using the Genesis Sample child theme by StudioPress however will work in any Genesis child theme.
There’s 2 steps –
# Step 1 : Copy & paste the PHP code from the functions file ( without the opening PHP tag ) to the end of your child themes functions file.
# Step 2 : Install the ACF plugin ( Free or premium version ) and import the file named acf.json located at Custom Fields > Tools > Import file in your WordPress Dashboard like this –
Here’s a look inside the download folder containing the 2 files you need to access for steps 1 & 2.
If you prefer not to use the ACF plugin, you can use WordPress custom fields like this with the code from step 1 solution 1 :
On each single post edit screen, create a new custom field named post_modified_date and add 1 as the value if you want to update the post date in the post info.
This method provides the code which enables you to add a checkbox to the Edit Post screen like this –
To use this solution, copy & paste the PHP code from functions.php to the end of your child themes functions file and upload the folder named meta-boxes to your child themes root directory like this –
Leave a Reply
You must be logged in to post a comment.