I am guessing a lot about how your themes work but, the child theme’s functions.php
runs before the parent theme’s functions.php
, so anything loaded by the parent’s functions isn’t going to be present for you to remove. You need to hook your function so that it runs later.
add_action('after_setup_theme', 'remove_custom');
Though you would need to mess about with the $wp_customize
variable. It would be easier to hook into the customize_register
hook with a high priority number so that your code runs after the parent registration code.
add_action( 'customize_register', 'remove_custom', 1000 );
Related Posts:
- Best practices – Should I create a child theme vs. customizing a framework theme? (such as HTML5 reset)
- When developing a distributable Theme, does it HAVE to be “inheritable”?
- Child Theme header1.php file not overwriting parent theme’s header1.php file
- WordPress theme Modifications not showing up on live server
- When to use is_home() vs is_front_page()?
- how can I add an icon/image for a child theme?
- Using classes instead of global functions in functions.php
- WooCommerce shop page to use my custom template [closed]
- My child theme doesn’t work Error: “The parent theme is missing. Please install your parent theme”
- Child Theme vs Duplicate Theme Renamed
- What are the ADVANTAGES of ORIGINAL wordpress template structure?
- Change admin bar to default:off
- Hide a div that is part of all pages on one specific page
- How to change admin bar color scheme in MP6 / WP 3.8 front end?
- How to add Color Picker in Theme Options for the following?
- Template for individual post designs
- Adding Action Hooks In Parent Theme For Easier Child Theme Customization
- When to use esc_url, esc_html, esc_attr, and friends?
- How to edit bbPress template files – WordPress + BuddyPress + bbPress? [closed]
- How can you develop on a live WordPress installation that is using W3 Total Cache? [closed]
- Add colors to existing color palette without replacing it
- Child Theme not loading parent CSS
- How to disable 3.1 “Admin Bar” via script for the admin user?
- is there a simple way to list every templates / php files used to generate a specific page?
- What is the best practice for customizing a plugin’s JavaScript/jQuery?
- add generated stylesheet from parent theme after child-themes style.css
- add_image_size is scaling, even though crop is set to true
- Change Genesis Tag from Page Template [closed]
- How do I get my child-theme to work with my theme’s includes folder?
- Front End Post Submit Form
- How do I get a parent theme modification from a child theme?
- Feature Survey – What would you want in a resume theme?
- Create a customizable child theme
- How the WordPress sidebar works
- Should we localize custom-made themes / plugins?
- Change loop order via form or link (jquery, not URL)
- CSS in child theme not overriding the parent theme [closed]
- Extend walker – navigation, adding data attribute to a tag
- How can I remove the Static Front Page option from the Customizer
- Set front page as static page [closed]
- Modifying JS files in Child-theme
- How to programmatically bring back “excerpts” field in post editor in WP 3.1+
- How can i customize the comment list
- Optimal solution to develop a wordpress theme?
- How to add custom template tag in wordpress theme?
- How should I store global information such as a phone number so that it is editable through the CMS?
- How to handle theme customization and sass variables
- wp_enqueue_scripts not called on search page?
- wp_head() not inserting the default stylesheet style.css
- Upgrading a custom theme through the Dashboard
- Nesting Functions within Functions
- Should I update my _s theme?
- Create a theme by combining a parent and a child theme
- How to keep my custom theme changes after updating genesis child theme
- First completely customized theme, where should I start?
- WordPress how to override function adjacent_posts_rel_link_wp_head() in link-template.php the correct way
- De-registering parent style sheet css recommended?
- Where is the correct place(s) in twentysixteen’s header.php to add a Google webfont?
- Theme Customizer not loading
- Can I customize any WordPress parent block-based theme template files by child theme like a parent classic theme?
- WordPress Multisite: Have the same header and footer of main-blog on all sub-blogs
- Responsive Images – Generating multiple images from Theme Customizer control upload?
- How to retrieve an image from a post and display it before excerpt of a post? [duplicate]
- Modify Javascript Configuration Options for Theme Customizer Colour Picker
- Best practices: Custom theme sidebar menu – hardcode or widget?
- Can a child theme based on Starker theme be released as free to use theme for public use?
- Best approach to create sites with Modular Content? [closed]
- Modify the Additional CSS section (adding a disclaimer)
- Override Constants in Child theme
- What’s the best action to use when you want to do something only once per theme setup?
- Changing order title and featured image in blog post (Astra theme)
- Loading files for theme and child theme (Require)
- Version control for both Vagrant config and themes being developed [closed]
- how can I remove the sidebar from my wp homepage [closed]
- Customizer API and add_panel(). Panel doesn’t show
- Unhook action from child theme
- Does any theme support child theme?
- How to correctly add JQuery in a WP theme?
- Am I supposed to create a child theme for every theme I use?
- Creating multiple hooks for theme
- What is the best way to handle multiple calls to get_template_directory_uri() and similar functions?
- Child themes: disabling the parent
- How to Edit the style of header title of Twenty Eleven Theme?
- Why is the Links Manager visible?
- How to remove a file included in parent theme with locate_template() via child theme?
- Can’t override template file in child theme
- Child theme style.css versioning
- Best way to start becoming a wordpress developer
- Cannot figure out how to overwrite files in child theme
- How to add theme support?
- How to add a second stylesheet to the editor
- How to reorganize the items returned by wp_list_comments()?
- which is the best way to customize nav-menu-template.php?
- Where should I update_options in a theme?
- WP 3.1 upgrade breaks AutoFocus+ theme
- Link to a .po file in a child theme
- Alias to theme folder for local development
- Inheritance of parent theme plugin files in a child theme
- Divi Child Theme not appearing in “Themes” [closed]
- Override template file i subfolders