Change Date Format in Renew Stack on Portfolio

Hi there,

I’m using the Renew stack and would like to change the date format on portfolio items to match the site setting of dd/mm/yyyy.

I’m using a child theme, what code do I need to add and where, please?

Many thanks - love your theme!
H

Hi There @ArmshouseGroup

Thanks for writing in! Head over to Settings -> General area on WordPress and set a date format according to your prefernece.

Once you save the changes, it will reflect in your portfolio items.

Please note: If you’re using a caching plugin on your server, you need to purge your server cache and also clear your browser cache before testing.

Hope that helps.

Hi,

Thanks for your reply. I did try your suggestion before I wrote in, but it didn’t seem to make a difference. I’ve purged the browser and CDN caches, but the portfolio hover is still m/d/y.

Any ideas? The page in question is at: https://kerrykspmu.uk/gallery/

Thanks in advance,
H

Hi There @ArmshouseGroup

Thanks for the URL to your page. For that renew portfolio, you need to do a little bit of customization to change the date format.

First you need to setup a child theme and activate it by following our guide here (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57). Then copy the file content-portfolio.php under your X theme (x/framework/views/renew/content-portfolio.php) into your child theme’s respective location (/wp-content/themes/x-child/framework/views/renew/content-portfolio.php).

Then edit the file in your child theme using a text editor (Note pad) and then locate the following line.

<span><?php echo get_the_date( 'm.d.y' ); ?></span>

Then change it as follows.

<span><?php echo get_the_date( 'd.m.y' ); ?></span>

Once you upload the changes to your server, make sure to purge your server cache before testing.

It should change the date format as follows.

For more date format examples, please check the following resource (https://codex.wordpress.org/Formatting_Date_and_Time).

Hope that helps.

Excellent, that did exactly what I wanted.

Thanks so much!
H

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.