child theme – fatal error php in child theme

Posted in: Newsmag
Post count: 44

I activated the child theme, but when I enter my customization in the file functions.php I get a fatal error php on the site …

here’s the code that I add after the basic template functions.php on child


// funzioni personalizzate
// Setup Admin Thumbnail Size
if ( function_exists( 'add_theme_support' ) ) {
add_image_size( 'admin-thumb', 100, 999999 ); // 100 pixels wide (and unlimited height)
}
// Thumbnails to Admin Post View
add_filter('manage_posts_columns', 'posts_columns', 5);
add_action('manage_posts_custom_column', 'posts_custom_columns', 5, 2);

function posts_columns($defaults){
$defaults['my_post_thumbs'] = __('Img Evid');
return $defaults;
}

function posts_custom_columns($column_name, $id){
if($column_name === 'my_post_thumbs'){
echo the_post_thumbnail( 'admin-thumb' );
}
}
add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');

function new_mail_from($old) {
return 'news@cinefilos.it';
}
function new_mail_from_name($old) {
return 'Cinefilos.it';
}

add_filter( 'jpeg_quality', create_function('', 'return 50;' ) );

remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );

add_filter('deprecated_constructor_trigger_error', '__return_false');

// fine funzioni personalizzate

thank you 🙂

Post count: 44

I add now that I put it in the main theme and working properly

Post count: 6535

Hi

The code from child theme’s functions file is executed in addition at the one from parent theme so make sure that the functions written in child theme have priority higher than the ones from parent theme, also provide more details about the error that you get if this doesn’t help.

Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newsmag’ is closed to new topics and replies.