Use value from ACF to populate other fields

Untested, but if I understand you correctly, try something like this: $results = new WP_Query( array ( ‘post_id’ => ‘<id-here>’, ‘post_type’ => ‘acf-field’, //not necessary, but insurance ‘post_excerpt’ => ‘<custom-field-name>’, //not necessary, but insurance ‘meta_query’ => array ( ‘key’ => ‘<custom-field-name>’, ) ) );

WordPress doesn’t save or publish new posts

Finally found a solution to my problem. In my case I had set a 301 redirect for my front page (that is for “domain.com”) to another page I wanted to use as the front page. Apparently that caused a problem when Elementor tried accessing it’s content (although I’m not sure why it needs the content … Read more

Prevent post from being published and show error

The argument syntax in your strpos() call is such that it’s testing the content for the literal string “$words” instead of the content of the $words variable. publish_post action hooks do not directly receive a post’s content as an argument. However if you use the provided arguments as detailed by the documentation, it is not … Read more

Set page to draft on plugin deactivation

I’m posting this as another solution for you and its based on the page id /* $post_id – The ID of the post you’d like to change. $status – The post status publish|pending|draft|private|static|object|attachment|inherit|future|trash. */ function change_post_status($post_id,$status){ $current_post = get_post( $post_id, ‘ARRAY_A’ ); $current_post[‘post_status’] = $status; return wp_update_post($current_post); } So once you have this function you … Read more

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