Article Publication Date Format does Not Include The Year - Question | JoomShaper

Article Publication Date Format does Not Include The Year

MG

Moises Perez Gutierrez

Template 2 years ago

Hi Joomshaper team,

I have the template newskit working in my joomla template. I manage an online newspaper containing hundreds of articles.

All articles shows in the header: author, publication date and number of views.

But the publication date is really confusing as it does not show the year. I don´t know how to change that format and add the year. Could you guide how to get it?

Thank you in advanced. Regards.

0
12 Answers
Ariba
Ariba
Accepted Answer
Support Agent 2 years ago #25840

Thank you.

Can you please check now?

I have added the code in this file /layouts/joomla/content/infoblock/createdate.php

And now the calendar icon is showing.

<i class="fa fa-calendar"></i>

Please let me know if that is alright now.

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 2 years ago #25761

Hi there!

Thanks for your query.

Let me have a look into it.

Best Regards

0
Ariba
Ariba
Accepted Answer
Support Agent 2 years ago #25762

Hello

Thank you for your query. Have you checked out the documentation please?

https://www.joomshaper.com/documentation/joomla-templates/newskit/how-to-change-date-in-article-addons

If it still does not work, we will check from our end with your access.

0
Ariba
Ariba
Accepted Answer
Support Agent 2 years ago #25766

I have checked from my end.

Can you please go to System -> Global configuration then Article Option and scroll down. You will find "Show create Date" Have you tried to enable this?

newskit-year.JPG

newskit-year-demo.JPG

0
MG
Moises Perez Gutierrez
Accepted Answer
2 years ago #25768

Hi Ariba,

It works as you indicated, so great. Thanks a lot. It could be a solution!!! :) However, I don´t want to show 2 dates in an article. It seems confusing to me.

Thus, I have switch off "publication date".

When I have done it, I have lost the "date icon in the left". You can see by yourself in the image below.

https://www.encomienda.es/images/2021/07/22/2021-07-22_18-43-02.jpg https://www.encomienda.es/images/2021/07/22/2021-07-22_18-43-40.jpg

Regards.

0
Ariba
Ariba
Accepted Answer
Support Agent 2 years ago #25773

You're most welcome.

You can edit this file: /layouts/joomla/content/info_block/create_date.php and insert the following code here as shown in the screenshot below. This will add the calendar icon.

<i class="fa fa-calendar"></i>

newskit-create-date-icon.JPG

OR,

You can also change this file: /layouts/joomla/content/info_block/publish_date.php and add the character 'Y' as shown in the screenshot below (red underlined) - which will add the year value to publish date. This is the first date that was showing by default without the year value.

newskit-publish-date-format.JPG

Please do let me know if that works and if you have any confusion.

0
MG
Moises Perez Gutierrez
Accepted Answer
2 years ago #25836

Hi Ariba,

When I choose your first solution, I see that the content of the file "create_date.php" is pretty different than yours. There is a "span" tag which seems to have a relationship with the icon. Anyway, whether I keep the tag span wether I replace it by your "<i class... etc>", it does not change anything in the frontend.

Regarding the second solution, I think something is not working as expected. The content of my file is a bit different than yours, and I can even delete it (my "publish_date.php") without any effect on the frontend. The publication date keeps showing as "Jul 22, 07:24 am".

Notice that for the first solution I have kept the global adjustment "Show create date" to ON, and the "Show Publish Date" to OFF, and I have setup the opposite for the second solution.

Download both of my files in the link:

https:///www.encomienda.es/images/2021/07/22/date_files.zip

Thanks a lot Regards

0
Ariba
Ariba
Accepted Answer
Support Agent 2 years ago #25838

Hello

Could you kindly provide your administrative access? Use the hidden mode to share the log in credentials.

0
MG
Moises Perez Gutierrez
Accepted Answer
2 years ago #25839

Hi Ariba,

Here you have them, in the hidden area. Thanks.

0
MG
Moises Perez Gutierrez
Accepted Answer
2 years ago #26056

Hi Ariba,

Now it´s working, thanks a lot! What did you do finally?

Regards.

0
Ariba
Ariba
Accepted Answer
Support Agent 2 years ago #26067

Hello

You are most welcome :)

I have added the following code in this file /layouts/joomla/content/infoblock/createdate.php

<i class="fa fa-calendar"></i>

This is inserting the icon before the date-time value.

0
Ariba
Ariba
Accepted Answer
Support Agent 2 years ago #26068

Kindly take some time to share your reviews in the links below if you are happy with our service, I would be very grateful.

Have a great day and stay safe

0