K2 items time not showing in frontend
April 2013 Joomla Templates
Rate this topic: 1.00 out of 6 based on 1 vote(s)
- GK User
- Tue Aug 12, 2014 7:26 pm
- Reply with quote
- Report this post
Hello. I am trying to figure out how can i display K2 item publish time in frontend. In backend i see the time as expected but not in frontend. I saw that the template in your demo page has only the date in k2 articles
http://demo.gavick.com/joomla25/rockwal ... premiereft.
Is there a way to display time too next to the date? Thanks in advance.
http://demo.gavick.com/joomla25/rockwal ... premiereft.
Is there a way to display time too next to the date? Thanks in advance.
-
- Junior Boarder
- teitbite
- Thu Aug 14, 2014 6:18 pm
- Reply with quote
- Report this post
Hi
Please edit file /html/com_k2/default/item.php and find line 38 which should looks like:
change it to:
Please edit file /html/com_k2/default/item.php and find line 38 which should looks like:
- Code: Select all
<time datetime="<?php echo JHtml::_('date', $this->item->created, JText::_(DATE_W3C)); ?>"> <?php echo JHTML::_('date', $this->item->created, JText::_('F j, Y')); ?> </time>
change it to:
- Code: Select all
<time datetime="<?php echo JHtml::_('date', $this->item->created, JText::_(DATE_W3C)); ?>"> <?php echo JHTML::_('date', $this->item->created, JText::_('F j, Y h:i')); ?> </time>
-
- Moderator
- GK User
- Sun Aug 17, 2014 1:17 pm
- Reply with quote
- Report this post
Thank you teitbite once again for your fast and accurate response. Worked like a charm. But is there a way to show 24-hour time? For example in here http://www.unboxholics.com/news/gaming/ ... sakh-karpa
I want to show 16:30 instead of 04:30.
I want to show 16:30 instead of 04:30.
-
- Junior Boarder
- GK User
- Mon Aug 18, 2014 8:56 am
- Reply with quote
- Report this post
Never mind. I found it. I just changed h to H in this line
- Code: Select all
JText::_('F j, Y h:i'))
-
- Junior Boarder
5 posts
• Page 1 of 1