Help wiht adding fullcalendar.io to a WordPress page

I’ve been trying to add this calendar to my wordpress page. And I’ve followed the documentation, but it’s still not showing up. This is what I’ve done.

I first added this to my child theme functions file:

function fullcalendar_jquery_enqueue() {
wp_register_script(‘fullcalendar’, “https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js”, false, null, true);
wp_enqueue_script(‘fullcalendar’);
}
add_action(“wp_enqueue_scripts”, “fullcalendar_jquery_enqueue”, 11);

function load_styles() {
wp_register_style(‘fullcalendarcss’, ‘https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.css’);
wp_register_style(‘fullcalendarprintcss’, ‘https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.print.css’);
wp_enqueue_style( ‘fullcalendarcss’);
wp_enqueue_style( ‘fullcalendarprintcss’);
}
add_action(‘wp_print_styles’, ‘load_styles’);

Then I added this JS to my custom.js file:

jQuery(document).ready(function ($) {
var calendar = jQuery(‘#calendar’).fullCalendar({
editable: true,
});
});

And then I added to one of my pages, but the calendar is not showing up.

Can someone please take a look and let me know what I might be doing wrong? Thank you!

Read more here:: Help wiht adding fullcalendar.io to a WordPress page

Leave a Reply

Your email address will not be published. Required fields are marked *