Roadwolf Posted July 29, 2023 Share Posted July 29, 2023 On a fairly fresh version of ProcessWire 3.0.210 I am trying to figure out how to change the 'posted by %name% on %date%' field to show the date the post was created, and not the date it was last modified. I attempted to modify this in the blog-post.php template but it doesn't seem to have any effect. I am a little lost as to where that specific line is being generated. Thanks for any help! RW, Link to comment Share on other sites More sharing options...
Gideon So Posted July 30, 2023 Share Posted July 30, 2023 Hi @Roadwolf Which site profile did you install?? Gideon 1 Link to comment Share on other sites More sharing options...
Roadwolf Posted July 31, 2023 Author Share Posted July 31, 2023 Hello :) It was the Uikit v3 'Regular' profile. Thanks! Link to comment Share on other sites More sharing options...
LMD Posted July 31, 2023 Share Posted July 31, 2023 On 7/29/2023 at 12:23 PM, Roadwolf said: On a fairly fresh version of ProcessWire 3.0.210 I am trying to figure out how to change the 'posted by %name% on %date%' field to show the date the post was created, and not the date it was last modified. I attempted to modify this in the blog-post.php template but it doesn't seem to have any effect. I am a little lost as to where that specific line is being generated. Thanks for any help! RW, In the regular site profile you can find the function that controls this output in the file called '_uikit.php' in the templates folder. Find the function 'ukBlogPost()' and go to the line defining the variable '$date' (see here on Github) to change it. Currently it is looking for the date (modified) and falling back to the created date string 'date|createdStr' -- just remove the 'date|' bit and leave 'createdStr'. Be sure to check the other functions in that file for other places the date may be displayed. 1 1 Link to comment Share on other sites More sharing options...
Roadwolf Posted August 2, 2023 Author Share Posted August 2, 2023 Thank you!!! I love ProcessWire! lol Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now