How to resolve issues with date format (requires child theme)
-
If you want to modify the date format you can do so by adding the following code to your child theme’s functions.php file:
add_action( 'the_time', 'my_own_datetimeformat'); function my_own_datetimeformat() { return the_date('j.n.Y'); }
referring to https://www.ads-software.com/support/topic/setting-up-date-format/
@berlindave
@ingx2
@mykopopovAdditionally there is the issue that Baskerville’s post list does not properly show the post dates if there are two or more posts with the same date.
You can fix this by adding the following code to your child theme’s functions.php:if ( ! function_exists( 'baskerville_meta' ) ) { function baskerville_meta() { ?> <div class="post-meta"> <a class="post-date" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php echo get_the_date( '', $post->ID ); ?></a> <?php if ( function_exists( 'zilla_likes' ) ) zilla_likes(); if ( comments_open() ) { comments_popup_link( '0', '1', '%', 'post-comments' ); } edit_post_link(); ?> <div class="clear"></div> </div><!-- .post-meta --> <?php } // end function } // end if
props to @khehl
- The topic ‘How to resolve issues with date format (requires child theme)’ is closed to new replies.