WordPress does not load jQuery

I forgot to add a default case to the switch…case statement of my add_script_attributes function in the functions.php file. Sorry that I did not see this before. From my functions.php: function add_script_attributes($tag, $handle) { switch($handle) { case “Popper”: return str_replace(“src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js””, “src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js” integrity=’sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo’ crossorigin=’anonymous'”, $tag); case “Bootstrap”: return str_replace(“src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js””, “src=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js” integrity=’sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI’ crossorigin=’anonymous'”, $tag); default: return $tag; … Read more

If has action not working as expected

That’s not what has_action does. has_action is true, if functions are added to fire on that hook. It is not a way to detect do_action calls. However in that code: Nothing was added to the acf_add_class action If something had been added, it still wouldn’t work because the body_class filter has already ran. It would … Read more

Populate acf-field, depending on block name

You are calling get_post() using null. Try to retrieve the post individually. Use get_post(get_the_ID()) to get the post content. $post = get_post(get_the_ID()); if ( has_blocks( $post->post_content ) ) { $blocks = parse_blocks( $post->post_content ); if ( $blocks[0][‘blockName’] === ‘acf/full-width-talker’ ) { } }