Trying to GET data with ajax from database and show in fullcalendar

There were a couple security issues and error checking that I did see. Try these: <?php add_action(‘wp_ajax_get_timeslot_data’, ‘get_timeslot_data’); add_action(‘wp_ajax_nopriv_get_timeslot_data’, ‘get_timeslot_data’); function get_timeslot_data() { if (!isset($_POST[‘activityId’]) || !ctype_digit($_POST[‘activityId’])) { wp_send_json_error(“Invalid activity ID”); } global $wpdb; $activity_id = intval($_POST[‘activityId’]); $table_name = $wpdb->prefix . ‘booking_seasons’; // Support custom table prefixes $result = $wpdb->get_row($wpdb->prepare(“SELECT timeslot_dates FROM $table_name WHERE id … Read more

Help with adding fullcalendar.io to a WordPress page

Figured it out! First I passed what Iceable suggested and also added moment script above, like so wp_register_script(‘moment’, “https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js”); wp_register_script( ‘fullcalendar’, “https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js”, array( ‘jquery’ ), null, true); and then I edited JS like so jQuery(function ($) { $(‘#calendar’).fullCalendar({ }) }); And it showed up!

Conflicting plugins break site

Try debug to see the error: https://wordpress.org/documentation/article/debugging-in-wordpress/. Check also wp-content/debug.log or any other configured log files for exact error. If the site is not working (blank page), disable plugins (just rename the plugins folder to “_plugins”). If you know which plugin is problematic go to plugins folder and rename the folder plugin: (plugins/_the_plugin). At least … Read more

WP FullCalendar Image Thumbs on Full Calendar [closed]

To display the Event thumbnail in the associated cell on the Calendar, we can do without using the ‘WP FullCalendar’ as follows. First of all deactivate ‘WP Full Calendar’ (if already activated) To add the formatting we want, go to Events > Settings > Formatting > Calendar and add this code: #_EVENTIMAGE

A problem with date archives

The problem is that the plugin only handles the calendar part, and not the archive query. What you need to do: Change the main query on archive pages if the post_type argument is present, eg: http://localhost:8888/wp/?m=201105&post_type=candy : add_filter(‘pre_get_posts’, ‘atom_include_cpt_in_archives’); function atom_include_cpt_in_archives($query){ // validate if(is_archive() && isset($_GET[‘post_type’]) && post_type_exists($_GET[‘post_type’])) $query->set(‘post_type’, $_GET[‘post_type’]); return $query; } Next, you’ll … Read more

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