WordPress Child Theme PHP Code Change Issues

I understand that parent theme updates are not supposed to affect child theme modifications, but does that mean that if I have header.php in my child theme (wp-content/themes/enlighten-child/header.php), then no parent theme updates to the header.php will affect my website? WordPress will always load the Child Theme’s header.php on your site, so theoretically no, it … Read more

WordPress child theme fails to override parent navigation menu in /inc/structure/header.php

You need to copy to your child and edit the function where the file is included, probably ´shop_isle_primary_navigation´, to change the path where the file is located. WordPress only loads automatically from child the default files, that’s the ones defined in template hierarchy. You can read more about this at https://developer.wordpress.org/themes/basics/template-hierarchy/

Change content of page in child theme using plugin

It depends on where you want to put the ‘hello’ thing. For instance, you could use the_content filter to put it before or after the content: function wp_add_to_the_content($content) { $content=”Text before the content.” . $content . ‘Text after the content’; return $content add_filter(‘the_content’, ‘wp_add_to_the_content’,10,1); You’d need to add any CSS and other tags to format … Read more

Font Awesome wp_enqueue_style

Try this, function enqueue_load_fa() { wp_enqueue_style( ‘load-fa’, ‘https://use.fontawesome.com/releases/v5.5.0/css/all.css’ ); } add_action( ‘wp_enqueue_scripts’, ‘enqueue_load_fa’);

Specific custom child theme page

You have the right idea. Your child theme’s copy of front-page.php will take precedence over the parent theme’s, with no danger of it being overwritten by updates to the theme. You will want to make sure to also create an actual page in WordPress to represent that page, and that on the WordPress -> Settings … Read more

Child Theme Translations with PoEdit

Found a solution that works for me: add_action( ‘after_setup_theme’, ‘avia_lang_setup’ ); function avia_lang_setup() { $lang = apply_filters(‘parent-theme-slug’, get_template_directory() . ‘/lang’); load_theme_textdomain(‘avia_framework’, $lang); load_child_theme_textdomain( ‘child-theme-text-domain’, get_stylesheet_directory() . ‘/lang’ ); } Note: Exchange “parent-theme-slug” (typically the parent theme name in small letters) and “child-theme-text-domain” (child theme text domain of your choice)