Add last modified date to Post Template FROM PANEL

Posted in: Newspaper
Post count: 43

Hello,

I am keeping the published post date and would like to add a ‘LAST MODIFIED’ date to the Post template.

I was able to add the code

<?php echo the_modified_date(‘l, F j, Y’, ‘<div class=”the-modified-date”>LAST MODIFIED: ‘,'</div>’); ?>

Under the code: <?php echo $td_mod_single->get_date(false);?>

IN Single_Template 2, 3, 4, 6, 7, 8, 11, 12, 13

BUT NOT (FROM PANEL, DEFAULT, STYLE 1, 5, 9 & 10)

Please advise where I do the same changes in the FROM PANEL, DEFAULT, STYLE 1, 5, 9 & 10 Template.

Thanks,

Nik

Post count: 43

Hello,

Please disregard my earlier question. I managed to add the coding in loop-single-php for (FROM PANEL, DEFAULT, STYLE 1, 5, 9 & 10) .

The issue is with the alignment now. There is No Text Space between the published date and the last modified date for all the loop-single-php.

How do I fix the issue?

I had added the code below in the Theme Template CSS custom for the Single-Template, and the alignment worked.

.the-modified-date{
display: inline-block;
vertical-align: middle;
color:#Aykbo;
}

Your suggestion is appreciated.

Thanks,

Nik

Post count: 22421

Hello,

Please also provide a link to your site so we can inspect the html structure and provide the proper css code. You will probably have to add in some div’s and classes to them in the code you altered so you can target them with css for positioning.
Maybe this will help: https://forum.tagdiv.com/topic/how-to-make-this/

Thank you!

Post count: 43

Hello Bodgan,

Thanks for your prompt response.

I inserted the code below to css custom code, and it worked, except for Template 11. I am still testing the theme, and can live with the minor alignment issue for now.

.td-module-meta-info {
display:inline-flex;
}
.the-modified-date {
padding-left:5px;
padding-right:10px;
padding-top:2px;
}

Cheers,

Nik

Post count: 22421

Hello,
If on a specific template it will not position properly, you can target each post style separately with css. Each post style has a unique class:
.single_template_11 is the one you seek. Use it like so:
.single_template_11 .td-module-meta-info{
display:etc.;
etc.
etc.
etc.
}

I hope this helps
Thank you!

Post count: 43

Thanks, Bogdan for the css. Will give it a try.

Much appreciated.

Nik

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.