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
- is there a simple way to list every templates / php files used to generate a specific page?
- 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]
- Should we localize custom-made themes / plugins?
- How can I remove the Static Front Page option from the Customizer
- How can i customize the comment list
- How to handle theme customization and sass variables
- wp_enqueue_scripts not called on search page?
- Should I update my _s theme?
- How to keep my custom theme changes after updating genesis child theme
- WordPress how to override function adjacent_posts_rel_link_wp_head() in link-template.php the correct way
- How to retrieve an image from a post and display it before excerpt of a post? [duplicate]
- Best approach to create sites with Modular Content? [closed]
- Override Constants in Child theme
- What’s the best action to use when you want to do something only once per theme setup?
- Loading files for theme and child theme (Require)
- Customizer API and add_panel(). Panel doesn’t show
- How to correctly add JQuery in a WP theme?
- 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 add theme support?
- Conditional statement to show pagination
- How to create a custom template to admin dashboard
- How do I Add images uploaded in the post to a default custom field
- How to add a button which saves the post then executes a function
- How to first edit in local WordPress editor on page and the add code?
- Custom Field created in add_meta_boxes reappearing itself again in the default Custom Metabox
- How to display all subpages and short by year
- Getting custom posts by post id from cutomizer text input
- Disabling Customizer Selective Refresh shortcut icons for selected controls
- changing blog title to an image using filter function in child theme
- Zoom on custom theme without child
- Can´t access child theme´s scripts dependencies found in parent
- How to override p2 breathe theme plugin in content template file?
- Changing a slider to a grid [closed]
- Custom Navigation build using wp_nav_menu and walker
- Using My Own Classes On Wp Unit Tests
- add_filter to parent theme helper class function from child theme
- Integrate WooCommerce theme with a WordPress theme [closed]
- How do you use WordPress for a website that’s not in a blog format?
- filemtime(): stat failed warning within a child theme
- How can I override a require() used in functions.php of parent theme to my child theme
- Replace site title with logo when logo is uploaded in customizer using
- How to transfer one domain to another domain without losing theme options (customizer)?
- Why would changing a child theme to a normal theme pass a Template is missing. error
- Extending Twenty Eleven Theme
- Simple child theme modification but links are broken
- Making a child theme for “Airi”
- How to change footer credit text in Twenty Twenty One theme with a hook?
- Templates without a loop, best practice?
- Hestia Child theme creation
- Alignment Problem [closed]
- Avada Child Theme Development
- What $handle does WordPress use for a theme’s implicit style.css?
- CSS added through customizer neglects the need of a child theme?
- How to override template files in parent theme?
- Is There A WordPress Hook for Accessing Attachments for A Particular Page?
- Clearing dummy data before launch
- Editing my theme to try to place the default header at the top of the page breaks the rest of the page content
- LESS not working in WordPress [closed]
- How to call a widget in a loop at a specific iteration value?
- Create theme for mobile phones and tablets only?
- How to add custom page elements to the WYSIWYG editor?
- Using the media library for theme customization
- Alternatives to handle customizer settings
- My contact form – I’ve changed the source code but the changes are not being applied
- How to modify theme content in Thematic?
- Why front-page.php doesn’t show content of file instead shows loop
- Copying a modified theme from one wordpress site to another wordpress site [closed]
- WordPress core jquery version file not loaded?
- What is an alternative to not using child theme to customize a WordPress theme?
- Where i must put hooks in overridable functions?
- (Parent) theme Is Not Showing In Theme Selection Panel and Therefore Breaks Child Theme
- Text View (Code View) in WordPress Customizer TinyMCE Editor
- What is the best practice workflow for new website overhaul and keeping current SEO ranking? [closed]
- Change header image on a particular page
- Update modified Shopify third-party theme [closed]
- Add a customize control depending wich radio setting is checked
- Providing updates to your WordPress theme
- WordPress Customizer Help with FontAwesome Icon
- Undefined index: custom_sidebars
- How do child themes work?
- How to prevent XSS attack in wordpress theme?
- Why WordPress gets old templates code instead of the last updated ones
- page.php is not called when I load a Page
- Theme Option’s Save Button is not working
- adding navigation to genesis themes
- Standard Way To Do Custom Work Within A Page?
- Extracting Distance from FacetWP Proximity Function to Display in WordPress Template
- Best practice to create required pages
- Is there any way to show child theme in theme detectors?
- How to split the site’s layout without damaging this layout? [closed]
- Multiple content areas with Gutenberg – Transparent areas mid content
- What’s your workflow for converting a static HTML website to WordPress? [closed]