How to automatically update ACF field value every year?

If you don’t want to use a scheduler (ex: Action Scheduler) or a cron job, and you only want to update once per year, then an option that tracks the next update time is probably the simplest approach (untested): add_action( ‘init’, static function () { $option_name=”cpt_ages_next_update”; $option = absint( get_option( $option_name ) ); if ( … Read more

Change formatting of Date parameter on custom post type

Use the post_date_column_time filter to change the time format. The documentation says it changes the “published time of the post”, but it will change the scheduled time as well (ticket). Tested: add_filter( ‘post_date_column_time’, static function ( $time, $post ) { if ( ‘wp_events’ !== get_post_type( $post ) || ‘future’ !== get_post_status( $post ) ) { … Read more

hide “Open in New Tab” checkbox in link field

Site-Wide Checkbox Hide You can add a simple function to your functions.php to change its visibility (and will also set the default checked state to false): function disable_open_new_window() { ?> <script type=”text/javascript”> jQuery(document).ready(function ($) { $(‘input#link-target-checkbox’).prop(‘checked’, false); $(‘#wp-link .link-target’).css(‘visibility’, ‘hidden’); }); </script> <?php } add_action (‘after_wp_tiny_mce’, ‘disable_open_new_window’); This will change the visibility of that checkbox … Read more

Query custom fields with three dates – start and end does not work

There is one issue I see in your code. Within ‘meta_query’ you cannot use ‘meta_key’, but it should be ‘key’. For example: array( ‘key’ => ‘_reservation_date_hour’, ‘value’ => $GMT_checkHour,//the value it is grab using ajax form ‘compare’ => ‘>=’, ‘type’ => ‘DATETIME’, ) So with your previous code all ‘meta_key’ lines were ignored. To identify … Read more

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