I don’t know exactly how your themes– parent and child– are constructed but the child theme’s functions.php
loads before the parent’s. So, if this template is included via functions.php
changes you attempt to make in the child functions.php
to that $Icons
array will be overwritten as soon as the parent function.php
loads. Since you say this has “many other functions”, it seems likely that this file is somehow included from functions.php
.
In fact, if maintemplate-somefile.php
is included by any file that $Icons
array will be overwritten, as per the code you posted there is no attempt to merge that array with pre-existing values.
If this is a page template, and you provide a replace template, the parent template will not load at all.
Your parent theme might have provided a hook that you could use, or there may be some other way to achieve the end you want, but given that you posted effectively no code it is hard to say much more.
Related Posts:
- WooCommerce shop page to use my custom template [closed]
- Hide a div that is part of all pages on one specific page
- Adding Action Hooks In Parent Theme For Easier Child Theme Customization
- Best practices – Should I create a child theme vs. customizing a framework theme? (such as HTML5 reset)
- Add colors to existing color palette without replacing it
- Child Theme not loading parent CSS
- 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 a parent theme modification from a child theme?
- Modifying JS files in Child-theme
- Should I update my _s theme?
- How to keep my custom theme changes after updating genesis child theme
- Where is the correct place(s) in twentysixteen’s header.php to add a Google webfont?
- Can a child theme based on Starker theme be released as free to use theme for public use?
- Override Constants in Child theme
- Changing order title and featured image in blog post (Astra theme)
- Loading files for theme and child theme (Require)
- Child themes: disabling the parent
- Child theme style.css versioning
- Cannot figure out how to overwrite files in child theme
- How to add theme support?
- Removing non native customizer settings from a child 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]
- Include Parent functions.php in Child Theme functions.php
- Select full Image Size on widget “Genesis – Featured Posts”
- 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
- Child theme enqueue scripts using new functions
- changing blog title to an image using filter function in child theme
- Can´t access child theme´s scripts dependencies found in parent
- Show woocommerce categories on my theme menu styling
- How to override p2 breathe theme plugin in content template file?
- Child Theme’s style.css not loading in mobile browser
- add_filter to parent theme helper class function from child theme
- How to properly create a child theme
- Renaming a theme so it aids SEO and the theme used is hidden
- 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
- Child Theme header1.php file not overwriting parent theme’s header1.php file
- Using a starter theme vs starter theme with child theme
- Will my site get messed up when the wordpress theme updates if I edited the html code in the editor to change footer?
- How to correctly enqueue the parent and child theme stylesheets in the creation of a child theme? [duplicate]
- Overide enqueue in non plugable function via child theme
- Why would changing a child theme to a normal theme pass a Template is missing. error
- Starting point for custom Themes [closed]
- 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?
- Do I need to create a child theme for JointsWP
- Hestia Child theme creation
- Alignment Problem [closed]
- Why is switching between themes breaking my child theme?
- Avada Child Theme Development
- What $handle does WordPress use for a theme’s implicit style.css?
- How to override template files in parent theme?
- jQuery from parent theme loaded with many other scripts in a single min.js file
- Is There A WordPress Hook for Accessing Attachments for A Particular Page?
- 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]
- Different themes on one site
- Add content after get_header
- How to modify theme content in Thematic?
- Why front-page.php doesn’t show content of file instead shows loop
- Theme functions don’t work as expected in partial included via get_template_part() after custom query using Ajax [duplicate]
- Copying a modified theme from one wordpress site to another wordpress site [closed]
- What is an alternative to not using child theme to customize a WordPress theme?
- Block validation failed for `core/pullquote` after adding theme support for editor-color-palette
- Where i must put hooks in overridable functions?
- How to show metabox on page if it is using a template
- Is_single not working properly in genesis
- (Parent) theme Is Not Showing In Theme Selection Panel and Therefore Breaks Child Theme
- How can I fix my theme header for my CSS stylesheet?
- How to test another theme in a live WordPress website instead of live preview?
- Debugging slow WordPress Theme Customizer (Any option similar to Query Monitor)?
- Editing Them with Child Theme Basics [closed]
- Child theme in separate WordPress Install
- Change header image on a particular page
- Update modified Shopify third-party theme [closed]
- how can I re-utilize and class on a child theme
- Providing updates to your WordPress theme
- How to show children pages as array
- Hook in parent theme Menu function
- How do child themes work?
- Protecting work on client’s web host
- Why WordPress gets old templates code instead of the last updated ones
- adding navigation to genesis themes
- Standard Way To Do Custom Work Within A Page?
- What to do when child theme is out of date with parent theme
- Extracting Distance from FacetWP Proximity Function to Display in WordPress Template
- add_action works outside condition but not inside it
- Image Size wrong during upload
- Is there any way to show child theme in theme detectors?
- Should I create a child theme for a parent custom theme? [closed]
- I’m new in developing responsive WordPress Theme, so which framework to use or work from scratch? [closed]
- Twenty sixteen – full height
- What’s your workflow for converting a static HTML website to WordPress? [closed]