prevent category page from also highlighting blog-page menu

Add this to your child theme’s functions.php: add_filter(‘nav_menu_css_class’, ‘fix_category_menu_active_class’, 10, 2); function fix_category_menu_active_class($classes, $item) { // If we’re on a category archive if (is_category()) { // Get the ID of the blog page (posts page) $blog_page_id = get_option(‘page_for_posts’); // If this menu item is the blog page if ($item->object_id == $blog_page_id) { // Remove the … Read more

Unable to remove action from parent theme via child theme

The child theme’s functions.php is loaded before the parent theme’s functions.php: Unlike templates and patterns, the functions.php file of a child theme does not override the functions.php file in the parent theme. In fact, they are both loaded, with the child being loaded immediately before the parent. Source: https://developer.wordpress.org/themes/advanced-topics/child-themes/#using-functions-php This means that when the child … Read more

Can’t disable child theme style

I solved the problem myself with this code: function remove() { wp_dequeue_style( ‘twentytwenty-style’ ); wp_deregister_style( ‘twentytwenty-style’ ); wp_dequeue_style(‘twentytwenty-child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array(‘twentytwenty-child-style’)); wp_dequeue_style( ‘twentytwenty-print-style’ ); wp_deregister_style( ‘twentytwenty-print-style’ ); } add_action( ‘wp_print_styles’, ‘remove’, 100 );

enqueue_custom_scripts isn’t working

Based on the information you’ve provided, there are a few potential reasons why your script might not be enqueued properly in WordPress. Let’s troubleshoot: Try cache busting: It is possible the file is loading but the code is not loading because the file is cached. Try the below code. The $version variable changes every page … Read more

How can I add ReactJS to the child theme?

I’d suggest the cleanest option if you want to do a bit more development to make your calendar reusable is to build it as a plugin which implements a shortcode. You’d have to do a bit of PHP programming to build your plugin, but this would be the cleanest solution. It’d give you a nice … Read more

How to disable the autozoom on mouseover for the product image in Storefront theme of WooCommerce?

Try this, I am not able to test it myself but I do remember using it or something like it in the past: jQuery(document).ready(function($) { // Disable zoom on product images $(‘.woocommerce-product-gallery’).trigger(‘zoom.destroy’); }); You can try this in your functions.php file remove_image_zoom_support() { remove_theme_support( ‘wc-product-gallery-zoom’ ); } add_action( ‘wp’, ‘remove_image_zoom_support’ ); Or, try this css … Read more