Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 736

Child theming is a safe way to modify a theme. A child theme inherits a "parent themes" styles and then can selectively override. This alternative to "destructive" editing allows for safe updating of the parent theme and provides an easy way to undo theme changes.

4 votes

How could child theme be different than parent theme if I haven't made changes?

This is possibly because you had a menu assigned, then you changed themes, and now there is no longer a menu assigned. Because Wordpress generates slightly different html for an assigned menu than for …
Tom J Nowell's user avatar
  • 60.6k
4 votes

how to call files in child theme?

All your included js and css files are included using relative paths. This is bad. You'll find that the use of a child theme is irrelevant, as it is horribly broken with and without a child theme. S …
Tom J Nowell's user avatar
  • 60.6k
2 votes
Accepted

How to handle a large child theme

I assume this will be a lot of extra load on the site to have all these extra files? Or are the parent theme files "skipped" and "doesn't count" if I have them in my child theme? if the child theme …
Tom J Nowell's user avatar
  • 60.6k
2 votes

Child theme css not loading when declared in parent functions

Because you're using a subfolder path that starts with a /. The official WP.org developer doc for add_editor_style has an example of how to add a stylesheet from a subfolder in the comments: /** * Re …
Tom J Nowell's user avatar
  • 60.6k
20 votes
Accepted

Is it possible to make grandchild themes?

Sort of "Yes" as a technicality, in practice No. You can specify a child parent as the parent theme, nothing stops this, and WordPress would attempt to use it. However You will run into major issues, …
Tom J Nowell's user avatar
  • 60.6k
3 votes

Should template files be copied to the child theme for editing?

You should only copy the files you intend to change, otherwise when the parent theme is updated, it will load the out of date files in the child theme that you didn't edit Think of it this way, any t …
Tom J Nowell's user avatar
  • 60.6k
4 votes
Accepted

CSS in child theme not getting loaded

Parent vs Child Themes get_template_directory_uri always refers to the parent theme you can verify this as you always should when things don't load as expected by looking in the console in the browse …
Tom J Nowell's user avatar
  • 60.6k
3 votes
Accepted

How can I override a require() used in functions.php of parent theme to my child theme

This is not possible, require is a PHP language construct, it's not a WordPress function, and can't be filtered or overriden via WordPress APIs These are your options: If the functionality you want …
Tom J Nowell's user avatar
  • 60.6k
0 votes
Accepted

How to enqueue multiple style sheets into my child theme in wordpress (oceanwp)

You had the right idea, but made an unfortunate typo: . './custom/navbar.css'. Removing the additional fullstop should correct the URL, otherwise you were succesfully enqueing a stylesheet, the code …
Tom J Nowell's user avatar
  • 60.6k
5 votes

get_stylesheet_directory() in child theme breaks parent scripts

The problem your facing here can be solved by changing the function being used: get_stylesheet_directory will give you the directory of the current active theme, aka the location of the active style …
Tom J Nowell's user avatar
  • 60.6k
0 votes
Accepted

Including code from other themes in child themes

The canonical answer is that themes are for visuals only, the rest go in plugins. In practice though, people bundle everything in a theme because it's easier to sell a zip you upload to the themes fol …
Tom J Nowell's user avatar
  • 60.6k
0 votes

Ajax call returning 0 in page template

3 major problems: extract, is dangerous and introduces major security issues. It's also completely unnecessary return instead of wp_die, you're meant to echo the output and then exit/die. If you do n …
Tom J Nowell's user avatar
  • 60.6k
4 votes
Accepted

How can I override file featured-image-first.php of Avada theme

Child themes let you override templates loaded via WordPress' template loading mechanism, e.g. get_template_part or the main theme templates such as index.php and single.php. But they can't be used to …
Tom J Nowell's user avatar
  • 60.6k
2 votes

Override Dokan Includes File in Child Theme

Child themes let you override templates, but these are not templates you're attempting to override. You can't drop in arbitrary files and override the parent theme, and WordPress can't do it's magic w …
Tom J Nowell's user avatar
  • 60.6k
0 votes
Accepted

Is it possible to override only a part of another plugin's / theme's js (asset) file?

Unfortunately no, you can dequeue the file as the other questions answer suggests and enqueue your own version, otherwise you'd need to load it and then try to modify the loaded code at runtime, which …
Tom J Nowell's user avatar
  • 60.6k

15 30 50 per page