-
Post count: 17sagarMarch 23, 2018 at 1:18 am #29861
I want to change Publish date with “Update on” Date, how to do it?
Post count: 2497RaiMarch 23, 2018 at 9:20 am #29869Hi,
If you refer to the single post, you could follow the instruction here: http://support.jegtheme.com/forums/topic/need-help-with-creating-homepage/#post-29520
Thank you
Post count: 17sagarMarch 23, 2018 at 9:49 pm #29895I wrote the Title wrong. So here is exactly what I want:
https://imgur.com/a/SkVUHIn the image, the Date in Post meta is the publish date, but I want to show the date on which the post is modified. For example, I published the post on 13 sept and modified it a little bit on 27 sept then I want the date 27 sept to be shown like this:
https://imgur.com/a/EcD26Post count: 2497RaiMarch 26, 2018 at 10:44 am #29930Hi,
Actually, the link I refer above is doing like you want, but just change the date, not showing the text “Modified at”. If you want to add that text, please try this code instead. Update file located at: jnews/fragment/post/meta-post-1.php with this code below:
meta-post-1.phpPHP123456789101112131415161718192021222324252627282930313233343536373839404142434445<?php$single = JNews\Single\SinglePost::getInstance();$author = $post->post_author;?><div class="jeg_post_meta jeg_post_meta_1"><div class="meta_left"><?php if($single->show_author_meta()) : ?><div class="jeg_meta_author"><?phpif($single->show_author_meta_image()) {echo get_avatar( get_the_author_meta( 'ID', $author ), 80, null, get_the_author_meta('display_name', $author) );}?><span class="meta_text"><?php jnews_print_translation('by', 'jnews', 'by'); ?></span><?php jnews_the_author_link($author); ?></div><?php endif; ?><?php if($single->show_date_meta()) : ?><div class="jeg_meta_date"><?php if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) : ?><a href="<?php the_permalink(); ?>"><?php echo jnews_print_translation('Modified at: ', 'jnews', 'last_updated') . esc_html(get_the_date(null, $post)); ?></a><?php else: ?><a href="<?php the_permalink(); ?>"><?php echo esc_html(get_the_date(null, $post)); ?></a><?php endif; ?></div><?php endif; ?><?php if($single->show_category_meta()) : ?><div class="jeg_meta_category"><span><span class="meta_text"><?php jnews_print_translation('in', 'jnews', 'in'); ?></span><?php the_category(', '); ?></span></div><?php endif; ?></div><div class="meta_right"><?php do_action('jnews_render_like', get_the_ID()); ?><?php if($single->show_comment_meta()) : ?><div class="jeg_meta_comment"><a href="<?php echo jnews_get_respond_link(); ?>"><i class="fa fa-comment-o"></i> <?php echo esc_html(jnews_get_comments_number()); ?></a></div><?php endif; ?></div></div>Thank you
You must be logged in to reply to this topic.