FullCalendar in WordPress is not working

You page is generating two errors: Uncaught TypeError: undefined is not a function. This is likely due to the fact that WordPress sets jQuery to NoConflict mode. Your script is using the $ shortcut and is failing. Modify your script accordingly, either replacing the shortcut or wrapping the jQuery. https://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_Wrappers

scripts not loading

You should enqueue scripts in functions.php itself with wp_enqueue_scripts hook. Like this. function my_jsfile() { wp_register_script( ‘menu’, get_template_directory_uri() . ‘/js/menu-effect.js’, array() ); wp_register_script( ‘thumbnail’, get_template_directory_uri() . ‘/js/thumbnail-effect.js’, array() ); wp_enqueue_script( ‘menu’ ); wp_enqueue_script( ‘thumbnail’ ); } add_action( ‘wp_enqueue_scripts’, ‘my_jsfile’ ); And also you should remove wp_enqueue_script from header.php as well as script links. And finally … Read more

Using wp_enqueue_script on scripts that contain PHP

If you’re outputting the script in the footer, you can call wp_localize_script at any point after your script is enqueued but before the script is output on wp_footer priority 20. function wp_enqueue_woocommerce_style(){ wp_enqueue_script( ‘chroma_js’, get_template_directory_uri() . ‘/js/chroma.js’, ”, ‘1.1’, true ); } add_action( ‘wp_enqueue_scripts’, ‘wp_enqueue_woocommerce_style’ ); function wp_localize_woocommerce_style(){ $array = array( ‘var1’ => $var1, ‘var2’ … Read more

Fatal error: Call to undefined function wp_enqueue_media()

As goto10 mentioned in comment, you must be using WordPress 3.5.0 or newer (when this function was added), AND your theme is calling wp_enqueue_media incorrectly. WordPress codex for wp_enqueue_media specifically states : “This function should be called from the ‘admin_enqueue_scripts’ action hook, or later.” Your theme is calling it incorrectly in admin_print_styles which is executed … Read more

How to register script with null value for version?

You literally specify the version number as null: function add_ajax_script() { wp_register_script( ‘ajax-implementation’, get_stylesheet_directory() . ‘/scripts/ajax-implementation.js’, array(‘jquery’), null, false); wp_enqueue_script(‘ajax-implementation’); } add_action( ‘wp_enqueue_scripts’, ‘add_ajax_script’ ); An empty string, ” is not the same thing as null.

I want to set global directory locations for my CSS and JS locations. How?

Sure you can do that. Create a simple plugin that looks something like this: <?php /* Plugin Name: SiteWide Assets Location Plugin URI: www.mysite.com Description: Global URI for commonly used CSS and JS files Version: 1.0 Author: Me License: None */ define( ‘SYSTEM_ASSETS’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/somedirectory/’ ); Then, store your .css and .js files there … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)