Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress child theme of a child theme

I'm using a theme what already is a child-theme of it's parent theme. Since I would like to make some changes, I want to make a child-theme.

How to make a child theme for a child theme?

like image 619
Max Avatar asked Oct 24 '17 14:10

Max


People also ask

Can you make a child theme of a child theme?

You can't really create a "grandchild" theme in the normal sense - i.e make it the child theme of a child theme.

What is the difference between theme and child theme in WordPress?

A child theme is a theme that inherits the functionality and styling of another theme, called the parent theme. Child themes are the recommended way of modifying an existing theme.

What is a child theme What difference does it make to use of a child theme?

A child theme is an add-on for your existing WordPress theme A child theme, as defined by the WordPress Codex, is a theme that “inherits the functionality and styling of another theme, called the parent theme.” Child themes are recommended to modify existing themes while still maintaining their design and code.

What is the purpose of a WordPress child theme?

A child theme allows you to modify the appearance of your WordPress website without editing your theme files directly. To understand why that's valuable, it's important to first understand the relationship between parent and child themes.


1 Answers

You can't really create a "grandchild" theme in the normal sense - i.e make it the child theme of a child theme. It might technically be possible (Smashing Magazine said it was back in 2013) but it seems to be generally considered to be not "Wordpress legit".

What you can do is create the grandchild theme as a plugin - although be aware that it tends to be considered as bad practice because it's an indication of bad architecture, and if you need a grandchild theme "something is wrong". However I can see the logic if you are using a third party theme that is itself a child theme.

Should you use a grandchild theme?

The main practical difficulties with grandchild themes are they they adds another level of "moving parts" into your site, making it more difficult to maintain and debug.

The references I've listed below discuss the practicalities and disadvantages of grandchild themes, so you can decide if this is still an option for you:

  • WP Smith: A Theme Framework, Child Themes, & Grandchild Themes
  • Justin Tadlock:
  • Tom J. Nowell's answer on wordpress.stackexchange.com to the question "Is it possible to make grandchild themes?"


How to create a "grandchild theme" using a plugin:

If you decide that this is the way to go, the following describe how to go about creating a plugin for your "grandchild theme"

  • Mark Barnes: Don’t edit child themes – use grandchild themes!

  • AppThemes: Creating Grandchild Themes

Alternatives to grandchild themes:

Another suggestion is to make a copy of the child theme to customise, although this means it's no longer easy to upgrade the child theme.

This article offers a way of editing the child theme in a way that "minimizes the coupling between the changes you make and the original child theme" ...meaning you don't need a grandchild theme and the changes to your child theme should (hopefully) be minimal, making it easier to upgrade.

  • Nelio Software: GrandChild Themes – Effective customization of Child-themes (based on Frameworks)
like image 94
FluffyKitten Avatar answered Sep 20 '22 16:09

FluffyKitten