How to make a child theme for Astra

If you use the Astra theme and have modifications to make to the theme’s PHP files or customizations to add in the form of functions, ideally you should not modify the theme files, but create a child theme.

It is never recommended to modify the files of the active theme because when you update they will be lost, so it is better to create a child theme.

Another thing is the style modifications, using CSS, which you can always do in the WordPress customizer, and they will be saved in the database, so they do not affect the theme files and you can always update without any problem. But if we are talking about WordPress functions or PHP code, JavaScript, etc, then we must make a child theme, yes or yes.

The Astra theme is not an exception, and although you could use some generic plugin, is not necessary, because on the same website of the creators of the theme you have a child theme generator for Astra.

If you choose the simplest option, just name it and click the “Generate” button, but I encourage you to display the advanced options to customize it.

You will be able to customize the version number of the child theme, be the author, with the URL of your website and define your own description of the child theme.

In addition to specifying a custom slug (folder name) and even uploading your own custom image.

When you are done, just click the “Generate” button to create your child theme and it will automatically start downloading a ZIP file with your child theme.

Now just go to your WordPress administration and in the Appearance -> Themes section add the new theme by uploading it.

Once installed you just have to activate it and you’ll have your Astra child theme.

Now you can start to…

  • Copy to the child theme the files of the parent theme (single.php, index.php, etc.) that you want to modify (always respecting the paths).
  • Add customizations to the functions.php file of the child theme.
  • Customize, menus, widgets, settings, etc. (normally the child theme will inherit these settings but it is worth checking).

Easy isn’t it?

Read this post in Spanish: Cómo hacer un tema hijo para Astra

How useful was this post?

Click on a smiley to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Skip to content