Morris.js for WordPress?

Create js folder in your theme directory then save Morris.js into it. it is not mandatory to store it in js folder you can store it anywhere else but i recommend to do it to seprate javascipt files from other files. Add follwing action into functions.php file function custom_scripts() { /* Include Scripts */ wp_enqueue_script( … Read more

How to load javascript file on homepage in WordPress in order?

In your functions.php: edit: First register the quicktags script under a different name than already registered in wp “quicktags” , see Codex function quicktags_script() { wp_register_script( ‘quicktags-min’, ‘/wp-includes/js/quicktags.min.js?ver=3.5.1’,”,”,true); wp_enqueue_script( ‘quicktags-min’ ); } add_action( ‘wp_enqueue_scripts’, ‘quicktags_script’ ); This will load the script for all the pages on your front-end. To load it only on front-page : … Read more

How to add comment on scripts using function in wordpress?

There is a generic way to use conditional comments – for styles. But unfortunately not for scripts until #16024 will be fixed. The details are described in this answer. To make your themes scripts filterable you could use a callback on wp_print_scripts and apply a custom filter in there. /** * prints a conditional comments … Read more

TypeError: window.tinyMCE.execInstanceCommand is not a function

https://stackoverflow.com/questions/22813970/typeerror-window-tinymce-execinstancecommand-is-not-a-function Thanks to Scott B In WordPress 3.9, the TinyMCE is updated to version 4, and in TinyMCE 4, the method “execInstanceCommand” has been replaced by the method “execCommand”. For compatibility issue (with old versions of WP), you must be check the TinyMCE version and used the suitable method. In below, i changed your code. … Read more

Using google graph api with wordpress

You should run updatepage() function after loading the google jsapi script. try jquery ready inside updatepage like this: function updatepage(){ // this line added by me jQuery(document).ready(function ($) { // Load the Visualization API and the piechart package. …. …. chart.draw(data, options); } } or you can see this shortcode code plugin for simple chart … Read more