• Resolved bhammondCVL

    (@bhammondcvl)


    The category links with a sub-menu in the main menu don’t behave as links should–they just open the sub-menu when clicked, so there’s no way to actually travel to the parent category page. How do I override this in a child theme?

Viewing 1 replies (of 1 total)
  • Thread Starter bhammondCVL

    (@bhammondcvl)

    Figured this out w/ an assist from StackOverflow.

    I created a folder and file in my child theme (/griddle-child/includes/custom.js) and then added this to my child theme’s functions.php:

    function custom_script_fix()
    {     
        wp_register_script('griddle-script', get_stylesheet_directory_uri() .'/includes/custom.js', false, '1.0');
        wp_enqueue_script( 'griddle-script');
    }
    add_action( 'wp_enqueue_scripts', 'custom_script_fix' );

    The new file (custom.js) overrides everything in the parent theme’s ‘griddle-script’ (/griddle/build/theme-script.js). This also wrecks the responsive menu for smaller screens, so you’ll have to add something else to your custom.js to get that working again.

Viewing 1 replies (of 1 total)
  • The topic ‘override default menu behavior’ is closed to new replies.