-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post date and time with update. #17
base: develop
Are you sure you want to change the base?
Conversation
Display the date and time a post was published just above the article's content. Checks if the article was modified and includes a date and time of the update if found.
Thanks for this PR! I'm a little crammed for time tonight before I get to pull this down and review this, so may not be til mid-week sadly. Will get to it ASAP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple minor comments here!
@@ -13,7 +13,15 @@ | |||
|
|||
<div class="blog-post"> | |||
<?php get_template_part('templates/parts/social-share'); ?> | |||
|
|||
|
|||
<p style="font-style: italic;"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a class here instead of the inline styling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be best, but I'm not seeing any WordPress CSS files that are accessed on the live site in the repository. I can either remove the styling or make use of the theme's style.css in the theme's root. I only see https://blog.codecorps.org/app/themes/codecorps/dist/styles/main-4aee62f95a.css referenced in the source.
<strong>Posted</strong>: <?php the_date('F j, Y'); ?> at <?php the_time('g:i a'); ?> | ||
<?php if (get_the_time() != get_the_modified_time()) | ||
{ ?> | ||
<br><strong>Updated</strong>: <?php the_modified_date('F j, Y'); ?> at <?php the_modified_time('g:i a'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also perhaps make use of padding/margin instead of the br
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would also vote on both of these to do date-only.
Removed some formating. Posted and updated times in their own p-tag.
@Dubhghlas I believe this is what you're looking for https://github.com/code-corps/blog.codecorps.org-site/blob/develop/web/app/themes/codecorps/assets/styles/style.scss |
Added two styles for post dates.
Encapsulated the two date displays within a div to allow for beautification. Not yet tested.
Display the date and time a post was published just above the article's content. Checks if the article was modified and includes a date and time of the update if found.