Skip to content
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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Post date and time with update. #17

wants to merge 4 commits into from

Conversation

Dubhghlas
Copy link

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.

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.
@joshsmith
Copy link
Contributor

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.

Copy link
Contributor

@joshsmith joshsmith left a 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;">
Copy link
Contributor

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?

Copy link
Author

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');
Copy link
Contributor

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?

Copy link
Contributor

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.
@joshsmith
Copy link
Contributor

Added two styles for post dates.
Encapsulated the two date displays within a div to allow for beautification. Not yet tested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants