Override Constants in Child theme

I have a parent theme that declare these constant in function.php: define(“THEME_DIR”, get_template_directory()); define(“THEME_DIR_URI”, get_template_directory_uri()); define(“THEME_NAME”, “BARNELLI”); define(“THEME_STYLES”, THEME_DIR_URI . “/css”); define(“THEME_INCLUDES”, THEME_DIR . “/includes”); define(“THEME_POST_TYPES”, THEME_DIR . “/includes/post-types”); define(“THEME_INCLUDES_URI”, THEME_DIR_URI . “/includes”); define(“THEME_FONTS”, THEME_DIR_URI . “/font-awesome”); i need to modify some files included in includes directory and copy the directory structure (including files). As … Read more

different child theme for subdomain

I’ve got a site that I’m trying figure out how to apply different child themes to based on a subdomain. Applying the child themes shouldn’t be difficult, it’s more the .htaccess magic that I’m a bit iffy on. What I’m after is a site that has say: example.com/red/ example.com/blue/ Where red and blue are different … Read more

Indirect modification of overloaded property WP_Post::$classes has no effect

I’m working on a child theme and while everything works the Walker_Nav_Menu and Walker classes are causing all the fuss. My parent theme overrides Walker_Nav_Menu as below: if ( ! class_exists( ‘Zen_Menu_Walker’ ) ) { class Zen_Menu_Walker extends Walker_Nav_Menu { public function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) { $element->has_children = … Read more

Child Theme, Functions.php Issues

I’ve been toiling, probably way too long, with a simple Child Theme for a version of Fukasawa. I know that the @import method is deprecated. I also know that enqueuing it the preferred method. But… I first tried The Codex, which seemed pretty darn simple to follow (although I’ve since read much that says “disregard … Read more

Child theme functions.php not executing

I have the following in a child theme’s functions.php file: <?php function theme_child_add_scripts() { wp_register_script( ‘script’, get_stylesheet_directory_uri() . ‘/js/script.js’, array( ‘jquery’ ), null, false ); wp_enqueue_script( ‘script’ ) } add_action(‘wp_enqueue_scripts’, ‘theme_child_add_scripts’); script.js isn’t included on the page and there’s no network request going out to get it. What could be going wrong? It’s unclear whether … Read more