Invision + WordPress integration

the error you see is given by PHP and is giving you a hint that the code you use has not been programmed carefully. It is violating strict standards, in you case, a function is called in a way it should not. That’s basically all. I assume on the server you just have installed the … Read more

Scripts at the end of the page

The hook for registering the script in the footer is: <?php function my_init_method() { wp_register_script( ‘myscript’, ‘http://www.mydomain.com/js/myscript.js’,”,”,’true’); wp_enqueue_script( ‘jquery’ ); } add_action(‘init’, ‘my_init_method’); ?> be sure to look at this and this, both are important.

Is there a way to list all the JavaScript scripts that are actually loaded by WordPress? Do we care?

I’ll answer each of your questions in order: Do we care which scripts are enqueued? Not really. WordPress registers each script and maintains it in an array. When you enqueue the script, WordPress will load it and any dependencies it has when it calls wp_print_scripts() (which is tied to the wp_head hook). If you enqueue … Read more

Script Code in Text Widget Does NOT Show

[SUMMARY] Although in theory, using the core provided Text Widget should allow you to put any arbitrary HTML code into action, I recently encountered the issue above where the code was wrapped by WordPress in such a way that affected the ability to render properly on Chrome. The code still showed up fine on Firefox … Read more

Correct check for any admin page with editor

Inspect the global variable $pagenow, and use post_type_supports() to find post types with an editor: function has_post_editor() { global $pagenow; if ( empty ( $pagenow ) ) return FALSE; if ( ! in_array( $pagenow, array ( ‘post-new.php’, ‘post.php’ ) ) ) return FALSE; return post_type_supports( get_current_screen()->post_type, ‘editor’ ); }

Change directory of javascript files

go to your themes functions.php and find line 122. You will find navigation.js function. get_template_directory_uri() . ‘/js/navigation.js and change it to get_template_directory_uri() . ‘assets/js/navigation.js do it again for skip-link-focus-fix.js code located on line 124. For customizer go and find customizer.php in ‘inc’ folder. Go line 53 and change js/customizer.js code to assets/js/customizer.js Don’t forget to … Read more