Jump to content

Recommended Posts

Posted

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,

Posted
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.

  • Like 1
  • Thanks 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...