I use this code and now it works. I think using wp-head instead of init was important in the add_action parameter:
function remove_sf_header_widget_region() {
if(!is_front_page()){
remove_action( 'sf_before_content', 'sf_header_widget_region', 10 );
}
}
add_action( 'wp_head', 'remove_sf_header_widget_region' );
Related Posts:
- Trying to use shortcode for a plugin on custom homepage of Responsive theme
- How to get home page ID?
- Overriding Plugin Template Files with Child Theme
- How do I cleanly override a plugin’s CSS with a child theme?
- Function to activate WordPress theme inside a plugin
- How do you auto-activate plugins from child themes
- Dynamic homepage according to user role
- How to load all plugins CSS after child theme CSS?
- Override the core function locate_template
- How to override my plugin’s php classes with duplicates that are in my child theme folder
- Uncaught Error: Call to undefined function get_user_by() after moving function from theme to plugin
- unzip a folder on specific location and delete the zip file
- Image resizing on home page (product category) [closed]
- Override plugin text domain in child theme
- Show only preview of posts on the homepage?
- How to edit Image layout in single product page in woocommerce on wordpress?
- Reusable functions and tools (Framework)
- Loading child theme script after plugins scripts
- New to wordpress: would like to have pluggable main page sections [closed]
- Override Javascript in a Plugin?
- Why does my functions.php cause white-screen and media-library issues?
- How do I display only the latest post on my home page, while maintaining proper plugin hooks?
- How to overwrite core/libraries/vendor template with child theme
- Buddypress – Add the post_id in the bp_activity_add function
- Removing an action from wp_footer called in a class that’s inside a bigger class
- How to show only next post pagination link using wp_link_pages()
- Installing plugins and using complex folder structure with child theme in WordPress
- Overriding Parent Theme… will cause plugins failure?
- How to over-ride a file in a plugin? [closed]
- WordPress override archive page template using a plugin
- Child Themes and Updating Parent Theme
- Customizing a blog page layout
- Managing wordpress Themes & plugins for multisite
- Set up functions to be overridden without using function_exists() by short-circuiting them?
- How to customize this theme? [closed]
- Programmatically install and activate child-theme
- how to add a comment button to be displayed only for the posts in the home page [closed]
- Change website directory safely to add a static page on startup
- Next Previous Post in wordpress with previous / next link with title?
- Per theme plugins?
- How to remove automatic generated tag in Home page
- is_front_page breaks with url parameters generated by a plugin
- Summary and Comments on Main landing Page
- How to override any plugin file in the child theme
- how to create a custom page in child theme or plugin?
- how to display recent post by category on home page
- Hide custom field value
- I have updated my plugins, though one page of the site has ‘hit a critical error’
- Ability to change homepage on WordPress using API
- Theme that includes a “core” plugin but the files in theme and child folder ignored
- Genesis Child Theme – Customize body
- Override plugin images so that they are not removed when the plugin is updated
- Writing SEO for Homepage when homepage is set to display latest posts
- Plugin function in child theme
- Crazy redirect happening with no redirects set up
- how to do Thematic like this website using wordpress?
- Google trying to index child theme files
- Cron job emails blank
- Set plugin page as homepage
- function of parent not working in childtheme
- What Are the Advantages of Using an mu-plugin
- How to tell if a script is being executed from a plugin, a theme or a child theme in WordPress?
- How to Change MU/BuddyPress Group Blog New Installation Defaults [closed]
- Issue with custom plugin
- Add meta tags with a plugin?
- Loading Canvas & WooCommerce translation file in child theme
- How do I activate my child theme, as I do not see it in developer tools
- How to wrap image logo in Homepage with H1 tag
- Can’t modify plugin function
- Scripts don’t enqueue after removing plugin
- A splash page on landing page
- Issue with customizer and widget page
- ACF prugin for WooCommerce Shop Page
- Any plugin installation and update overwrite current theme
- Hide prices and checkout functionality in woocommerce
- plugin get value from admin panel page
- WordPress network: set themes and plugins for new blog
- How can I get a list of plugins and which blogs are using them?
- How WordPress autosave can save plugin fields?
- Set a category for a page
- Weird lightbox phenomenon [closed]
- Reduce Drop down Menu Width in WordPress
- issues with wp_enqueue_script in my plugin
- How to inform the user that the save was not successful?
- php page not found for plugin options menu
- Call plugin with php function
- Overriding post’s font-family
- Override/ignore CSS from active theme as not to interfere with my custom CSS
- WordPress Custom Pages that work with Plugins?
- Hide DIV if empty – Plugin Gallery
- Theme deactived html and css styling on home page posts
- Website Captcha Error: The reCAPTCHA wasn’t entered correctly
- How can I change a translation for a string in a plugin?
- Can’t Edit Row Layout on SiteOrigin Plugin
- Create dynamic / data driven pages in wordpress
- Modifying meta keys in User Meta Pro using user_meta_pre_user_register not working
- User Affiliate Token Generator?
- WP Members additional fields on user profile [closed]
- How do I edit a plugin’s core properly?
- How can I make my plugin detect if a certain theme is active?