- This topic has 8 replies, 2 voices, and was last updated 6 years, 5 months ago by Skandha.
-
AuthorPosts
-
July 10, 2018 at 2:43 pm #149108TGParticipant
The date on my articles is the original publish dates when viewing the list of articles on the homepage, but changes to the update dates when you click on an actual article. Is there a way to change that so it’s only the publish date whether viewed from the homepage or after clicking on the article?
July 11, 2018 at 12:14 am #149122SkandhaParticipant@tg: Please post in your site URL so that I can look into the issue.
Kind Regards,
SkandhaJuly 11, 2018 at 12:39 am #149127TGParticipantHere you go:
http://www.talkgenesis.orgYou’ll notice on the homepage, it lists old publish dates. Then when you select, it lists the latest update date.
July 11, 2018 at 1:13 am #149131SkandhaParticipant@tg: For this you will need to create a child theme and make few customization. Please let me know if you are familiar with child theme customization.
Kind Regards,
SkandhaJuly 11, 2018 at 1:17 am #149132TGParticipantno clue.
July 11, 2018 at 2:29 am #149135SkandhaParticipant@tg: First you will need to create a child theme. If you do not know how to create a child theme you can use Generate Child Theme Plugin.
Then Go to => Child Theme Folder => functions.php file and paste the following Code.
if ( ! function_exists( 'simplecatch_loop' ) ) : /** * Display the page/post loop part * @since Simple Catch 1.3.2 */ function simplecatch_loop() { if ( is_page() ): ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> </header><!-- .entry-header --> <div class="entry-content clearfix"> <?php the_content(); // copy this <!--nextpage--> and paste at the post content where you want to break the page wp_link_pages(array( 'before' => '<div class="pagination">Pages: ', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', 'pagelink' => '%', 'echo' => 1 ) ); ?> </div><!-- .entry-content --> </article><!-- #post-## --> <?php elseif ( is_single() ): ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> <div class="entry-meta"> <ul class="clearfix"> <li class="no-padding-left author vcard"><a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" title="<?php echo esc_attr(get_the_author_meta( 'display_name' ) ); ?>" rel="author"><?php _e( 'By', 'simple-catch' ); ?> <?php the_author_meta( 'display_name' );?></a></li> <li class="entry-date updated"><?php $simplecatch_date_format = get_option( 'date_format' ); the_time( $simplecatch_date_format ); ?></li> <li><?php comments_popup_link( __( 'No Comments', 'simple-catch' ), __( '1 Comment', 'simple-catch' ), __( '% Comments', 'simple-catch' ) ); ?></li> </ul> </div> </header> <div class="entry-content clearfix"> <?php the_content(); // copy this <!--nextpage--> and paste at the post content where you want to break the page wp_link_pages(array( 'before' => '<div class="pagination">Pages: ', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', 'pagelink' => '%', 'echo' => 1 ) ); ?> </div> <footer class="entry-meta"> <?php $tag = get_the_tags(); if (! $tag ) { ?> <div class='tags'><?php _e( 'Categories: ', 'simple-catch' ); ?> <?php the_category(', '); ?> </div> <?php } else { the_tags( '<div class="tags"> ' . __('Tags', 'simple-catch') . ': ', ', ', '</div>'); } ?> </footer> </article><!-- #post-## --> <?php endif; } // simplecatch_loop endif;
Let me know if this works out!
Kind Regards,
SkandhaJuly 11, 2018 at 3:00 am #149136TGParticipantWow. Thank you. I’ll let you know.
July 11, 2018 at 3:03 am #149137TGParticipantthough I’m curious what a “child theme” actually is.
July 11, 2018 at 3:16 am #149138SkandhaParticipant@tg: When you make edits to your core theme files to make some changes in your site, this changes will be lost when you update the theme to the new version. So in order to retain the customization, first a child theme is created and then customizations are done. To know more about child theme follow this link.
Also Did the code I provided you work out?
Kind Regards,
Skandha -
AuthorPosts
- The topic ‘Blog dates?’ is closed to new replies.