Automatically Select Parent Category Plugin for wordpress


Hello all,

I’m trying to get this plugin to hook into “The Events Calendar”. They pointed me to their hook to save events


I’m importing events from google calendar and what I need is for their plugin to select the parent category when creating the new event. I tried simply hooking into the plugin I downloaded that does seem to do this when you select the events’ categories but it breaks the import functionality when I try to use the hook. Any ideas? Is there an easier way of doing this? Could you all suggest PHP that could accomplish this? I’m a PHP noob so don’t expect me to know anything about this.

Here is the code from the plugin

function super_category_toggler() {

$taxonomies = apply_filters(‘super_category_toggler’,array());
$taxonomies[$x] = ‘#’.$taxonomies[$x].‘div .selectit input’;
$selector = implode(’,’,$taxonomies);
if($selector == ‘’) $selector = ‘.selectit input’;

echo ’


add_action(‘admin_footer-post.php’, ‘super_category_toggler’);
add_action(‘admin_footer-post-new.php’, ‘super_category_toggler’);

Thank you for your help!