I have the same issue
Fatal error: Class ‘CZR_BASE’ not found in /blog/wp-content/themes/customizr/inc/czr-init.php on line 15
Hi there,
do you use a child theme?
If yes, what do you have in your child-theme functions.php?
Hi Rocco,
I have this
//Fire Customizr
require_once( apply_filters( ‘czr_init’, get_template_directory() . ‘/inc/czr-init.php’ ) );
which probably causes the issue.
In the child-theme functions.php?
Well a child-theme functions.php must not be a copy of the parent theme functions.php.
That’s the only file of the child-theme that doesn’t replace the parent one. Both of them are called (the child one first).
https://codex.wordpress.org/Child_Themes#Using_functions.php
Hope this helps.
I have several child themes, all with this:
<?php
/**
* This is where you can copy and paste your functions !
*/
// fix to remove breaks in shortcode of aMember
function remove_wpautop(){
remove_filter ('the_content', 'wpautop');
}
add_filter('init', 'remove_wpautop');
add_action( 'wp_enqueue_scripts', 'load_my_child_styles', 20 );
function load_my_child_styles() {
wp_enqueue_style( 'child-theme', get_stylesheet_uri() );
}
But in child themes, I do have the Full Width Layout theme from Customizr site. I did notice this in the template:
czr_fn_main_wrapper_classes
Has czr class been changed to something else?
Hi andrew55,
that
czr_fn_main_wrapper_classes
never existed in Customizr.
Are you talking about the filter?
<div id="main-wrapper" class="<?php echo implode(' ', apply_filters( 'tc_main_wrapper_classes' , array('container') ) ) ?>">
Anyway the error you pasted in your first message points to another issue.
Change
//Fire Customizr
require_once( apply_filters( 'czr_init', get_template_directory() . '/inc/czr-init.php' ) );
to
//Fire Customizr
require_once( get_template_directory() . '/core/init-base.php' );
This is ok,
but still that line of code must not be in the child-theme functions.php at all.
Otherwise every time the parent theme changes that logic you might have the same problem.
As the codex says:
[…] the functions.php of a child theme does not override its counterpart from the parent. Instead, it is loaded in addition to the parent’s functions.php. (Specifically, it is loaded right before the parent’s file.)
In that way, the functions.php of a child theme provides a smart, trouble-free method of modifying the functionality of a parent theme. Say that you want to add a PHP function to your theme. The fastest way would be to open its functions.php file and put the function there. But that’s not smart: The next time your theme is updated, your function will disappear. But there is an alternative way which is the smart way: you can create a child theme, add a functions.php file in it, and add your function to that file. The function will do the exact same job from there too, with the advantage that it will not be affected by future updates of the parent theme. Do not copy the full content of functions.php of the parent theme into functions.php in the child theme.
Do not copy the full content of functions.php of the parent theme into functions.php in the child theme.
Thank you infobeckettgraphics.