When a function is hooked, it is easy to change that in a child theme. What you need to do is
-
Remove the original call back function
-
Copy the function to your child theme and rename it.
-
Do your customizations as needed
-
Rehook your call back function
You can try the following:
// Remove the callback function from the hook
remove_action( 'after_setup_theme', 'mytheme_setup' );
// Copy the function, rename and do what you need
function my_new_callback()
{
// Modify what you need
}
// Rehook your custom callback
add_action( 'after_setup_theme', 'my_new_callback' );
Related Posts:
- Overriding core functions in child theme
- Change parent theme file function in child themes functions.php
- Overwrite Parent Theme add_image_size in Child Theme
- How to store a number (coming from cookie) into query vars for later usage in other filters?
- Load a Child Theme’s style.css just before the closing tag
- Why functions metaboxes is causing White Screen in Admin [closed]
- Include files in child theme functions file
- Display random categories on the front page (Finding and Editing Theme Functions)
- How to get woocommerce inventory status [closed]
- One Child Functions.php for Multiple Child Themes
- How to use get_template_directory_uri() to load an image that is in a sub-folder of my theme?
- Implementing DNS Prefetching with WordPress
- Child theme – overriding add_image_size by a child theme [duplicate]
- Organize functions.php
- Function in Child Theme not overriding Parent Theme function [duplicate]
- Add inline css to theme
- How to override enqueued styles using a child theme
- Dequeue script in template isn’t working
- Add external js file to footer with id
- Child theme functions.php not executing
- How to store / access files in child theme folder
- Make “sidebar template” the default template for new pages
- override parent theme configuration in child functions.php
- wp_enqueue JavaScript in child-theme (ReferenceError) using Search & Go
- How do I get a child theme to load scripts from the parent theme?
- How to call custom function from functions.php in site-wide template files?
- How to use thumbnails in gallery?
- Logic to Print/echo a css class only for 1st post and ignore all post after 1st? [closed]
- Best practice when altering a parent theme function inside a child theme?
- Avoid loading css from parent theme
- Why does the ‘wp_nav_menu’ function work only until a menu is created?
- is_customize_preview() like function to check if Customizer “Live Preview” in JavaScript
- Overwriting Parent Theme’s Image Sizes
- Problem only while using require_once() within functions.php
- Twentyten Child Theme: header images display messed up in admin panel
- enqueue styles for only mobile wp
- Jquery implementation not working on page reload
- Reuse variable in hook callback
- Automatically include all php files in a child theme directory
- Override the function twentytwelve_scripts_styles in a child theme
- Usage of theme name in functions
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- How to load parent theme template parts in child theme
- ACF not showing
- Running script based on Category
- Check if the image size is available and if not use ‘full’ image size
- Remove Custuomize Sections
- Can we create our own theme’s function.php?
- Not all CSS elements transferring via parent to child?
- Define PHP variable from a seperate API if statement
- get_pages() Returns Only One Item
- Does size of a theme’s functions.php file matter?
- get_next_posts_link() returns no result despite available posts
- Randomizing wp_tag_cloud() in child theme
- Nav menus all outputting the same links
- Where do I go to edit this area? [closed]
- How to insert class in each list of categories?
- Parent theme styles overriding child theme CSS [closed]
- Getting the teaser text without overriding global variables
- Child theme function.php causes fatal error
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- How to overwrite template.php file
- Solution dealing with Child Theme / Parent theme functions
- Removing parent theme CSS without editing parent theme
- What is the correct way to include my new functions and scripts in WordPress?
- How to override this theme function in child theme
- wp_nav_menu work in functions.php but not in the theme
- Overwriting TwentyTwelve template file with child theme template, but lower in the hierarchy
- Looking for Functions File that doesn’t Exist
- How to fix Function create_function() is deprecated in / themes
- WordPress wp_dequeue_script remove all other scripts
- Can I use ‘Featured Image’ as a hero image and a thumbnail?
- Add Javascript code to functions.php childtheme
- wp_title() return random number
- Replace theme function
- How to offset main query without affecting other queries and backend
- How would I correctly implement a new if statement in a child functions file?
- Child Theme not loading multiple stylesheets
- How to retrieve image IDs from shortcode content?
- HowTo: Add wrapper to columns shortcode?
- Including admin-options.php file in Child Themes
- How to create admin ajax function for my contact form
- Class::$template_dir_path=get_template_directory();
- uninstall a theme programmaticlly
- wordpress not calling peliegro functions.php?
- Update add_image_size
- Language switcher for subdomains
- How to add next height number in Order Attributes inside the Add new page. [duplicate]
- Is it possible to change parameters of Parent theme function in the Child theme?
- Functions.php in child theme that loads CSS file breaks website
- unregister_sidebar in child theme not working
- Unregistering custom tinymce plugin?
- Add the title of a widget as an ID – for anchor links
- Child Theme not working – CSS gone
- Add custom css to theme
- Why don’t ‘wp_nav_menu’ CSS classes work until a menu is created?
- How to get postId from the argument $block when register_block_type()?
- WordPress is adding pagination for all pages not only for blog page, How to remove pagination for all pages except blog/posts page?
- post_row_actions filter from parent theme not executing in child theme
- Setcookie not setting cookies anywhere except admin