child theme – XTRA Tutorials https://xtratheme.com/docs Documentation of XTRA WordPress Theme Fri, 20 Sep 2024 17:46:37 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.2 How to Safely Add PHP Code to WordPress Theme’s functions.php Using a Child Theme? https://xtratheme.com/docs/how-to/how-to-safely-add-php-code-to-wordpress-themes-functions-php-using-a-child-theme/ https://xtratheme.com/docs/how-to/how-to-safely-add-php-code-to-wordpress-themes-functions-php-using-a-child-theme/#respond Tue, 17 Sep 2024 07:53:20 +0000 https://xtratheme.com/docs/?p=4247

Description

Step 1
Xtra

Using Child Theme

  1. Download Child theme from package
  2. Install Child Theme and Active It
  3. Find and edit the functions.php file of the child theme
  4. Add your custom PHP code below the existing codes in the file, then Save it
  5. Test the Changes

    Once you’ve added the PHP code to the functions.php file of the child theme, it’s important to test the website to ensure everything works properly. Clear your browser cache or test in an incognito window.
    If you encounter any issues, you can always access the child theme’s functions.php file via FTP or the hosting File Manager to revert any problematic changes.

Tip

You might also be interested to know…

You might also be interested to know that adding PHP code to the functions.php file of a WordPress theme through a WordPress child theme is the best way to preserve your changes. Not only does it prevent your modifications from being overwritten during theme updates, but it also ensures the security and stability of your site.

]]>
https://xtratheme.com/docs/how-to/how-to-safely-add-php-code-to-wordpress-themes-functions-php-using-a-child-theme/feed/ 0
What is a Child Theme? https://xtratheme.com/docs/developer/what-is-a-child-theme/ https://xtratheme.com/docs/developer/what-is-a-child-theme/#respond Wed, 12 Jun 2024 11:47:47 +0000 https://xtratheme.com/docs/?p=2836

What is a Child Theme?

Step 1
What?

Child Theme

A child theme in WordPress is a sub theme that inherits all the functionality, features, and style of its parent theme. Child themes are a safe way to modify a WordPress theme without actually making any changes to the parent theme’s files. When the parent theme gets updated, changes made in the child theme are preserved and applied on the updated version as well.

This is why child themes are the safest and best way to make changes to an existing theme. Rather than modifying theme files directly you can simply override them with the templates in the child theme.

How to find the Xtra Child Theme?

  • Download the Child Theme of Xtra Theme from here:

You can find the Child Theme in the package that you are downloaded from ThemeForest, make sure that you are downloaded the “All files and documentation

Download tf all

In the downloaded package you can find the Child Theme inside the Theme folder

  • /theme/xtra-child.zip
Child theme in all files

Xtra Theme Buyers

  1. Go to www.xtratheme.com
  2. From menu click on My account
  3. In My Account page find Purchase history
  4. Click on View and Download button
Xtratheme my account purchases

Download parent and child theme files

  1. Find XTRA Installable File and download file
  2. Find XTRA Child Theme and download file
Download parent child theme
]]>
https://xtratheme.com/docs/developer/what-is-a-child-theme/feed/ 0