Tell us what you are trying to do?
I'm creating a event list, the date is displaying in englishm but the wordpress language is set on catalan, what can I do for displaying in catalan the months and the days?
Is there any documentation that you are following?
In the forum, I've tryied all the answers and ddidnt work
Is there a similar example that we can see?
What is the link to your site?
hidden link
Hello,
I assume we are talking about a custom date field created with Toolset Types plugin.
How do you display above custom date field? with Toolset Single Field block?
https://toolset.com/block-item/single-field/
I have tried it in my localhost with a "Català" WP installation + the latest version of Toolset plugins, it works fine, for example today value, it outputs:
28 de maig de 2021
Please provide detail steps to reproduce the same problem.
Hello Luo,
I'm using the repeater Oxygen,
I'm adding a code block;
<?php
// Get the post ID
$post_id = get_the_ID();
$toolset_field = "wpcf-data";
// Get the Toolset date
$timestamp = get_post_meta( $post_id, $toolset_field, true );
// Convert string to int
$timestamp_to_int = (int)$timestamp;
// Data catala
// Data que agafa del custom field "wpcf-data"
$date = (date('j F', $timestamp_to_int));
?>
<div class="my-date"><?php echo $date;?></div>
You can try with built-in function types_render_field() of Toolset Types plugin, for example, replace this line from:
<div class="my-date"><?php echo $date;?></div>
To:
<div class="my-date"><?php echo types_render_field("data", array("format" => "j F"));?></div>
More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#date