Hi,
How to show ‘last modified date’ on every single post, replacing the default ‘published date’? Im not too familiar with these things đ
I use “Style 3″ as sitewide post template. So I edited loop-single-3.php file:
Replacing this:
<div class=”td-module-meta-info”>
<?php echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_date(false);?>
<?php echo $td_mod_single->get_comments();?>
<?php echo $td_mod_single->get_views();?>
</div>
with this:
<div class=”td-module-meta-info”>
<?php echo $td_mod_single->get_author();?>
<span> Updated: <?php the_modified_date(); ?></span>
<?php echo $td_mod_single->get_comments();?>
<?php echo $td_mod_single->get_views();?>
</div>
The problem is, I use other post template style on some particular posts but I cant find the above mentioned code in some other template style file. So, how to make other post template to show ‘last modified date’?
Is there better way to do this?
Thanks in advance.
-
This topic was modified 9 years by
dilcot.
Hello,
Different post templates can have the get_date function in the second file. Each post template has 2 files that correspond to it. A loo-single file and a single_template file: http://screencast.com/t/MGXznfwFyKTa – http://screencast.com/t/nkXyQ43QMIPm
Thanks.
Thank you for the information provided above. Very Helpful! Can you please point to where we can fix the styling so that it aligns with the author name? See photo: http://imgur.com/a/6YlVB
Hi Bogdan,
I tried that but it didn’t work. I also tried to target it with a div class like this:
.single .td-post-title .td-module-meta-info.date{ position:relative; top:2px; }
and like this
#date.single .td-post-title .td-module-meta-info{ position:relative; top:2px; }
and like this
.date.single .td-post-title .td-module-meta-info.date{ position:relative; top:2px; }
But none of those worked. =/ The domain is: http://pacifictribune.com
Any help is greatly appreciated!
Thank you so much,
-Brad
Hi,
Try this code and see if it works for you, just enter it in Theme panel->Custom Css
.single .td-post-title .td-post-author-name {
top: 1px;
}
Result – https://www.screencast.com/t/OQ2e0OWvMV8
Thanks
I just tried that and it didn’t. =(
I also tried this:
.loop-single .td-post-header .td-post-title .td-post-author-name .td-module-meta-info .date { top: 1px; }
}
That didn’t work either. =(
-Brad
Hi,
Try making the change using !important it should forcibly apply, and check or remove any previous code from custom css or modifications related to this, also you should clear all your caches
The code should look like this
.single .td-post-title .td-post-author-name {
top: 1px!important;
}
If it still does not work send an email at contact@tagdiv.com and provide wp-admin (login information and admin rights) so we can login and investigate. Please also include a link to this topic.
Thanks