• Resolved kaio cesar

    (@kaio-cesar)


    Hello,

    I was wondering if I can put the ‘Time’ of my posts.

    I tried a few things. but I could not succeed.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi kaio. Where are you wanting to display the time? Blog post page? Category archive pages? Single post pages? Do you want to add the time to the date, or replace the date?

    Thread Starter kaio cesar

    (@kaio-cesar)

    I want add time with the date.

    Because i have many post for day, and with time is gonna be better.

    Here’s a post you might read for some background information:
    https://wordpress.org/support/topic/modifying-date-format-1

    For specific post types you would do the following:

    Featured post
    1. Copy content-featured.php to a child theme (if you don’t currently have a child theme you can download one from the theme web site).
    2. In this section of the file:

    <div class="post-meta group">
    	<p class="post-category"><?php the_category(' / '); ?></p>
    	<p class="post-date"><?php the_time('j M, Y'); ?></p>
    </div><!--/.post-meta-->

    change the “post-date” line to add the time:

    <p class="post-date"><?php the_time('j M, Y'); ?> <?php the_time(get_option('time_format')); ?></p>

    Home page and Category Archive page posts
    1. Copy content.php to your child theme.
    2. Make the same changes described above.

    Single posts
    1. Copy single.php to your child theme.
    2. Change the “post-byline” line from this:

    <p class="post-byline"><?php _e('by','hueman'); ?> <?php the_author_posts_link(); ?> · <?php the_time(get_option('date_format')); ?></p>

    to this to add the time:

    <p class="post-byline"><?php _e('by','hueman'); ?> <?php the_author_posts_link(); ?> · <?php the_time(get_option('date_format')); ?>  <?php the_time(get_option('time_format')); ?></p>

    Sidebar widgets
    If you’re using the AlxPosts and/or AlxTabs widgets you could follow the same procedure for updating those. Just be sure to copy the related php files from the parent theme to the same relative path in your child theme.

    Thread Starter kaio cesar

    (@kaio-cesar)

    Awesome!!

    Thank you!!

    You’re welcome; glad to help.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Post with Time’ is closed to new replies.