window.onload wont execute in wordpress

Well don’t mix PHP and Javascript without the proper tags <script type=”text/javascript”> jQuery(document).ready(function( $ ){ if(location.href != “https://linestar.ca/contact-us/”) { alert(“Make sure you use the right contact Tab!”); } else { alert(“LineStar Welcomes You!”); } }); </script> As a sidenote, your website has lots of issues that you have to work out eventually.

Correctly enqueue scripts of type=text/paperscript (PaperJs Library)

I’m not sure if this will solve your problem, but you can use the script_loader_tag filter to change the type text/javascript to text/paperscript add_filter( ‘script_loader_tag’, function( $tag, $handle, $src ) { if( ‘your-script-handle’ === $handle ) { $tag = str_replace( ‘text/javascript’, ‘text/paperscript ‘, $tag ); } return $tag; }, 10, 3 );

Add custom classes for blocks in editor based on custom attributes

You can do this with the editor.BlockListBlock filter. More info here. This allows you to do something like the following: const withCustomAttributeClass = createHigherOrderComponent( ( BlockListBlock ) => { return ( props ) => { const { attributes } = props; const { yourCustomAttribute } = attributes; const class = yourCustomAttribute ? ‘my_custom_class’ : ”; … Read more