WordPress: How to edit the theme PHP files or CSS

The options below will ensure tat any code based changes you create will not be lost during a theme update.

How to edit/change CSS styling

You can add/change CSS on your site via the “Additional CSS” tab in the Customizer. This will also show you a live update of the CSS changes as you create them. Follow the steps below to add custom CSS to your site:

1. Go to pipdig > Theme Hooks in your dashboard:

2. Look for the “Additional CSS” tab near the bottom of the list:

3. You cna now add any CSS in the options:

Note: Any custom CSS that you add using theme customizer is only available with that particular theme. If you would like to use it with other themes, then you will need to copy and paste it to your new theme using the same method.

How to add code to the <head> section of your site

You can add any code to the <head> section by going to the pipdig > Theme Hooks page in your dashboard. There is more information about that in this guide.

How to edit or override the PHP files

It is possible to change the PHP files in our themes by creating a “child theme”.

A child theme is a theme that inherits the functionality and styling of the parent theme. Child themes are the recommended way of modifying our themes if you need to make advanced changes.

You can download a pre-made child theme for any pipdig theme from this page.

It is possible to override any of the main theme files by copying it into the child theme’s directory. For example, if you wanted to replace the header.php file, you would copy that file into your child theme. This will then override the main parent theme’s header.php file.

Warning! We do update the theme files from time to time. It is your responsibility to make sure that your child theme files are consistent with the main parent version.

Was this article helpful?