ACF + WPML: How to translate date fields?

You can use the global $wp_locale to get the month translated in each language. You just need to get the month number (01 to 12) from the Acf field. You have the functions in the WP_Locale class get_month() and get_month_abbrev() global $wp_locale; $month = $wp_locale->get_month(04); // Output april in english $month_abbrev = $wp_locale->get_month_abbrev($month); // Output … Read more

ACF gives a syntaxError unexpected token

You’re missing quotes around the content of innerHTML. If correctoutput is <div></div>, then you’re script looks like this: $(‘#correcto’).innerHTML(<div></div>); Which is invalid, because you’re missing quotes. innerHTML needs a string, which is in quotes in JavaScript. That first < is where your error is coming from. So you need to do this: $(‘#correcto’).innerHTML(‘<?php the_field(‘correctoutput’); ?>’); … Read more

Advanced Custom Fields repeter field expiration

Possibly better than strtotime, as you already know the date format would be date_create_from_format(). Something like: $course_start = date_create_from_format(‘dmY’,$row[‘start_date’]); if ($course_start > date(‘dmY’)){ echo ‘<tr>’; echo ‘<td>’ . $i . ‘</td>’; echo ‘<td>’ . $row[‘start_date’] ; // Check, if “end_date” field is not empty if( $row[‘end_date’]) { echo ‘ – ‘ . $row[‘end_date’] . ‘</td>’; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)