How does the child theme work? There are no absolute links.

[ad_1]

I did the child theme tutorial on WordPress.org. [https://developer.wordpress.org/themes/advanced-topics/child-themes/])

How does the child theme communicate with the parent theme? The URL’s in the “header” are not absolute. Does it just know where to look?

I got mine to work, but I’m having a hard time understanding how.

[ad_2]
2 Comments
  1. A child theme must contain a style.css file that contains a [comment header with “template”]) which points to the parent. A child theme’s `functions.php` and template files (if they have them) get priority over the parent’s theme files. But everything else refers to the parent.

    Child themes are great if you buy a theme and want to make tweaks to things like styles and templates. It allows you to only change what you need, without messing with the parent theme. Where this is super helpful is when the parent theme receives an update from its developer, your changes aren’t lost. It’s a fantastic architecture.

    HTH.

  2. Child themes are an over-ride system. Template hierarchy will first look at the parent theme, but if it finds that file in the child theme it over-rides the parent theme and uses the file in the child theme. You activate the child theme when it is installed or created. It’s the theme you use.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer