Unregister Nav Menu with fallback?

You can filter ‘wp_nav_menu_args’, set an invalid theme_location and the magic function __return_false as fallback: add_filter( ‘wp_nav_menu_args’, ‘override_parent_args’ ); function override_parent_args( $args ) { if ( ‘header-menu’ === $args[‘theme_location’] ) { $args[‘fallback_cb’] = ‘__return_false’; $args[‘theme_location’] = ‘ticky_tacky’; } return $args; }

How to override a non pluggable and non hookable function in a WordPress parent theme?

to redefine the AJAX action, you can try that add_action(AE_Base::AJAX_PREFIX . “ae-profile-sync”, function () { $profile_action = $GLOBALS[“et_freelance”]->profile_action; // remove base action remove_action( AE_Base::AJAX_PREFIX . “ae-profile-sync” , [ $profile_action, “sync_post”, ] , 10 ); // add new AJAX action add_action( AE_Base::AJAX_PREFIX . “ae-profile-sync” , function () { // new code here } ); }, 1); … Read more

Load template inside a parent template

if ( condition ) { get_template_part( ‘path/to/template’, ‘mobile’ ); } else { get_template_part( ‘template’, ‘mobile’ ); // in rootpath } You can also intercept the behavior for get_template_part() with an action hook: // Source in get_template_part do_action( “get_template_part_{$slug}”, $slug, $name ); function wpse21352_template_part_cb( $slug, $name ) { switch ( $name ) { case ‘mobile’ : … Read more

Why do WordPress default themes specify fonts in so many places?

There’s not a universal standard for this. The precedents that the core Themes are setting are incidental to rebuilding and innovating. They are not by design. They define font families for the Editor in the back end to establish a consistent feeling for content. Source: https://github.com/WordPress/twentysixteen/blob/master/css/editor-style.css Within the actual main styling of the Theme, there … Read more

some things in child theme css not overriding parent

You have to set a new background or the one defined in the parent stylesheet will be applied. background-image: none; Image and color are not mutually exclusive, so both just deleting the background-image line or/and defining a background-color won’t change a background image defined somewhere else.

Disable child theme css on certain pages

There are two methods to accomplish what you what need to do. METHOD 1 The first method is to create a separate stylesheet from your child’s main style.css, and then move all your css into that stylesheets. For this example, lets call this stylesheet custom-style.css. As said, copy all the css that will be specific … Read more