Admin notice on wp_insert_post

Hooks cannot be added directly inside functions. Using do_action, you can invoke a custom hook. In your case try out the below solution: add_action( ‘wp_insert_post’, ‘automate_intercom’, 10, 3 ); function automate_intercom( $post_id, $post, $update ) { if ( $post->post_status == ‘publish’ && $post->post_type == ‘help-center’ ) { $someCondition = ”; if ( $someCondition !== ” … Read more

ACF Extended : Disable styles in front [closed]

Here my solution: add_action(‘wp_enqueue_scripts’, function () { // prevent acfe automatic style enqueue wp_register_style(‘titre-sous-le-header-layout-titre-fond-couleur’, false); wp_register_style(‘titre-sous-le-header-layout-titre-fond-couleur’, false); wp_register_script(‘titre-sous-le-header-layout-titre-fond-couleur’, false); wp_register_script(‘titre-sous-le-header-layout-titre-fond-couleur’, false); }); Final Solution I forgot to show my final solution to eliminate all css load by the_flexible() function: function layout_get($content): void { foreach ($content as $layout) { foreach ($layout[‘layouts’] as $value) { $handle = … Read more