How can I add in the page date

Permalink Browser Info Environment
HI There - thanks for this template, it is really handy. I just need to be able to add in the date of the post to autoload along with the title, but I have been trying to dupe the code from the blog index template and that doesnt work. My php is no good.

Would be really helpful if you could let me know what to add.

thanks

Type: Discussion
Status: New
tobyme
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
You can use this code to get the publish date of a page (put this under the "$title = ..." line):
$date = date('F j, Y', strtotime($page->getCollectionDatePublic()));


Then you do something like this in your markup, wherever you need the date printed:
<?php echo $date; ?>


Hope that helps!

-Jordan
madesimplemedia replied on at Permalink Reply
madesimplemedia
That works great thanks!

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.