Well, all I needed to fix the issue was to add the exact same priority to the remove_action and it worked pretty well, thanks to Sally CJ answer
add_action( 'wp_head', 'remove_site_hero_sections');
function remove_site_hero_sections() {
global $theme_header_layout;
remove_action('theme_site_header', array($theme_header_layout, 'site_hero_sections'), 9999);
}
Related Posts:
- File from parent theme imported to child theme doesn’t work – any ideas?
- remove_action on after_setup_theme not working from child theme
- Enforcing password complexity
- why is translation not working on theme?
- Is it possible to disable a function of a parent theme?
- How to override an unpluggable parent theme function?
- Check php version before theme activation
- How can I remove “Proudly powered by WordPress” from twentyeleven without modifying footer.php?
- How do I remove a require_once admin panel from the parent theme from the child theme functions.php?
- How to get the registered sidebar’s name by its id?
- Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’
- Can i check if user is doing any ajax request?
- One button to change all settings in theme customizer?
- Copyright info change in Theme Child PHP
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- Add footer.php to WordPress child theme
- Setting up the child theme so as to enable right-to-left WordPress?
- Design view breaking on Pages
- How to override a non pluggable and non hookable function in a WordPress parent theme?
- Understanding WordPress child theme custom JS loading
- Hooking new functions to actions + passing parameters
- Why do filters/actions require an argument count?
- Overriding a theme redux file in child theme
- Want to create Child theme, but already edited Parent theme css files and some php files
- How the functions in WP are called in tags
- How to access function from outside of a class within this class in WP plugin?
- How to use return in my custom function instead of echo
- Add a Second Menu to a theme that only support 1 menu
- Adding tawk.to code just before body tag on functions.php file
- Can’t load WP function into external function
- Set WordPress Default Template
- WordPress child theme fails to override parent navigation menu in /inc/structure/header.php
- Adding Default Settings to Theme My Login plugin
- add_action shortcut?
- How to style options page in dashboard?
- Where in PHP do I move title and meta (date) to bottom of each blog section?
- WordPress add post format support not working
- Modify custom field input data before creating a new post
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- How do I link a button I created in theme customizer to a function?
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- Error call_user_func_array() expects parameter 1 to be a valid callback when using image_size_names_choose
- jQuery code not working when included in functions.php
- Copyright info change – Corporate Plus Theme PHP [closed]
- Override a function defined in wp-includes/comment-template.php
- Nested “do” and “add” Actions is possible?
- get_template_directory adding FTP root folders in urls
- WordPress redirect redirecting too many times or not at all
- Warning: printf(): Too few arguments in helpers.php file
- How do I check or test a WordPress Auto Year Change Script?
- How to have different site identity logos on each page on Astra Theme [closed]
- blank white page when post/update/change option etc
- Problems clearing cache
- Removing “Powered by” footer using child theme PHP [closed]
- Overide Variable in Child Theme
- child parent styles enqueue order
- How to style injected code in header section?
- Randomize Color Scheme Selection in Theme
- Child Theme’s Read More Text
- Displaying Slider in Front Page (home) using Customizr Theme
- How can I assign separate stylesheets to different pages?
- Need advice on theme customizer and child themes
- How to make sure relative URL works when site is not on root domain?
- How to pass hook variable to function?
- call a string/function from database
- Some problems calling a function into sprintf() inside functions.php template file [closed]
- Dynamically switch file in get_template_directory_uri() | Function [closed]
- Uncaught TypeError: extract(): Argument #1 ($array) must be of type array, null given
- Proper way to remove html code on child theme
- How to use data URL in WordPress?
- How to change this ajax function to submit to the default wordpress content area instead of the custom field ‘seller notes’?
- Child theme overirde template-tags in a theme built on underscores in inc/template-tags
- PHP “warning include_once(): Failed to open stream” Simple HTML DOM in WordPress Child Theme
- How to override theme’s public static function inside of a trait?
- How to Change Site Elements based on referring URL
- how to use 2 index.php file One for mobile and one for desktop
- Add the shortcodes from the enfold theme to the other theme
- WordPress child theme, creating a custom php template page
- Menu to the right of screen on desktop using Bootstrap 4
- Hook into all password resets in WordPress and get password before hashing?
- remove_action() not working in page template – Genesis
- Unable to pass arguments to function used in add_action
- Local WordPress from Git repo, where to set document root?
- Removing get_template_part in child theme
- WordPress HTML Helper
- Highlight posts currently being edited on multiple editor site?
- Need help with Deprecated: Non-static error when update PHP 7.4 -> 8.1 with Dyad 2 theme
- Why a class property becomes empty?
- a problem in class in class-wp-hook.php
- Is there a hook that I can use when a fatal error occurs?
- esc_attr() right way and use
- How to add 2 posts under another post? Formatting should be intact
- Can’t Find a Way to Edit the Home Page Content [closed]
- Function to capture a value and store it in a variable
- Checking array against author id in loop
- Tell WP register script to load a script only when the entire page is loaded
- Display Visual Composer shortcode if a post belongs in specific categories
- Programmatically add a product to the cart and set price to zero when buying from certain category
- I want to show cart items number if any or nothing, simple CART text
- Send foreach $_post method to contact form 7 [closed]