How would I correctly implement a new if statement in a child functions file?

you put a , instead of ; at end of $advert_details. you will better see this kind of error if you better indent the code. add_action(‘wp_enqueue_scripts’, ‘theme_enqueue_styles’, 12); function theme_enqueue_styles() { wp_enqueue_style(‘parent-style’, get_template_directory_uri() . ‘/style.css’); } if (!function_exists(‘adifier_custom_meta’)) { function adifier_custom_meta() { $meta_boxes = array(); $advert_details = array( array( ‘id’ => ‘advert_cond’, ‘name’ => esc_html__( … Read more

Change default color scheme in twentyfifteen child theme?

Adding ‘default’ should work. Did you try calling the colors and seeing if your filter is working? If it’s not you could try adding a higher priority to your filter add_filter( ‘twentyfifteen_color_schemes’, ‘my_custom_color_schemes’, 99 ); function my_custom_color_schemes( $schemes ) { $schemes[‘default’] = array( ‘label’ => __( ‘my new default color’, ‘twentyfifteen’ ), ‘colors’ => array( … Read more

How to get custom translations from child theme to be loaded?

Actually my mistake, I was overriding the translation of the parent theme using it’s text domain for child theme, while I should have defined a different text domain for child theme and load both domains into child theme’s functions.php like this: add_action( ‘after_setup_theme’, ‘mr_load_textdomain’ ); function mr_load_textdomain(){ //for child load_theme_textdomain (MR_DOMAIN,get_stylesheet_directory().’/languages’); //for parent load_theme_textdomain (ET_DOMAIN,get_template_directory().’/lang’); … Read more