How to disable publish_future_post auto add wp_options cron

You could hook pre_schedule_event to stop scheduling them, e.g. function pre_schedule_event_no_publish_future_post( $result, $event, $wp_error ) { if ( $event->hook === ‘publish_future_post’ ) { // Don’t schedule this event return false; } return $result; } add_filter( ‘pre_schedule_event’, ‘pre_schedule_event_no_publish_future_post’, 10, 3 ); You could possibly remove the _future_post_hook call instead remove_action( ‘future_post’, ‘_future_post_hook’, 5, 2 ); but … Read more

WordPress Translation not working for my theme

Confirm that the translation functions are being loaded. Sometimes, issues with function loading can prevent translations from working. Basic example of loading translations in your theme’s functions.php file function my_theme_load_textdomain() { load_theme_textdomain( ‘my_theme’, get_template_directory() . ‘/languages’ ); } add_action( ‘after_setup_theme’, ‘my_theme_load_textdomain’ );

Replacing specific Gutenberg blocks

I am not sure If I get what you meant, but study https://developer.wordpress.org/reference/hooks/render_block_this-name/ filter, whan calling it give it $accepted_args number of 3 and inspect what is returned in $block_content or $instance. ID is encoded as ref attribute, if that’s what you are missing. You could also use render_block filter, but render_block_{$this->name} is more convenient, … Read more

How can I dynamically set the base URL of an ACF custom URL field?

Add the following code to dynamically set the base URL for your ACF custom URL field. Replace slide_url with the name of your ACF custom URL field function custom_acf_slide_url_base_url($value, $post_id, $field) { // Get the base URL dynamically based on the environment $base_url=””; if (strpos(site_url(), ‘staging’) !== false) { $base_url=”https://staging.example.com”; // Replace with your staging … Read more

Elementor – Sort by name

I don’t know much about elementor, but to keep this as a Purely WordPress answer you need to change your query to sort by post name. The code you provided looks like a pre-query filter so you should try this: add_action( ‘elementor/query/kunst_op_kunstenaar’, function( $query ) { $query->set( ‘order’, ‘ASC’); $query->set( ‘orderby’, ‘title’); } This sets … Read more

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