Site logo

Archived topic

E-Compile Error Crash after updating theme

24 replies · Started by Yolanda on April 15, 2022

Viewing posts 16–25 of 25

Hello Ying,
That is exactly what I've been trying to do, if you read the post from the start....

Ah sorry, reading Tom's reply, I thought the issue was from your child theme.

Can you try Tom's suggestion that upload a new child theme to replace the current one? or simply remove the child theme and then activate the parent theme?

Let me know :)

Hello Ying,
Can you please read the whole post?

Hi Yolanda,

I have passed this onto Tom - may be best that we keep the dialog between you and him.

Thank you David!

Hi Yolanda,

I looked at your child theme. This should be the entire functions.php file in the child theme:

<?php
/**
 * GeneratePress.
 *
 * Please do not make any edits to this file. All edits should be done in a child theme.
 *
 * @package GeneratePress
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

// hide UAG template banner
add_filter( 'ast_block_templates_disable', '__return_true' );

All the stuff below that needs to be removed, as the parent theme already does it all.

I also looked at header.php and didn't notice any custom changes made to it. This means you can remove that file from the child theme completely. Not a bad idea to keep a backup in case I'm missing something, but I don't think I am.

Making those two changes should fix the issues you're seeing.

Let me know :)

Hello Tom,

Technically it wasn't possible to change the functions.php - I got an error that it couldn't be saved.
I've decided to deinstall the Child theme and just use the regular GP theme.
After doing that, my lay-out was a chaos, so I had to make some changes and put back the CSS codes. That worked, and my site looks fine now, with the latest update. So that's good news!

But yet still I'm puzzled with the child theme. Wasn't this in the past the best procedure when you wanted to make CSS changes?
And what happens with a new future update, will my changes not be overwritten?
When do you use a child-theme anyway?

Thanks for the great support and your time, also from David!

Glad to hear you found a working solution.

To cover the theme settings vs child theme:

Any settings you make in the Customizer, any CSS you add to the Customizer > Additional CSS and any Elements your create in the Elements module are saved in your WordPress database. Which means you can safely update the theme without losing any of those settings.

Child Theme are;

a. 100% required if you need to make changes to templates examples: a theme templates single.php or a plugin template such as a Woocommerce email template.

b. a better way to store large amounts of CSS or adding functions, although both of these can be done with Customizer CSS and the Code Snippets plugin.

I still personally add a Child Theme even if I don't need it right away but there may be a chance that point (a) above is required in the future.

Thank you!!!

You're welcome!

This archived topic is closed to new replies.