Change language of child theme
-
I think I must be missing something about how to change the language settings in a child theme. I have:
1. Made a new *.po and *.mo (using PoEdit);
made a /languages/ folder in the child theme;
put the files here.2. Copied the functions.php from the parent theme folder to the child folder;
deleted everything except the alx_load function;
changedget_template_directory
toget_stylesheet_directory
.So my functions.php looks like this:
<?php if ( ! function_exists( 'alx_load' ) ) { function alx_load() { // Load theme languages load_theme_textdomain( 'hueman', get_stylesheet_directory().'/languages' ); // Load theme options and meta boxes load_template( get_template_directory() . '/functions/theme-options.php' ); load_template( get_template_directory() . '/functions/meta-boxes.php' ); // Load custom widgets load_template( get_template_directory() . '/functions/widgets/alx-tabs.php' ); load_template( get_template_directory() . '/functions/widgets/alx-video.php' ); load_template( get_template_directory() . '/functions/widgets/alx-posts.php' ); // Load custom shortcodes load_template( get_template_directory() . '/functions/shortcodes.php' ); // Load dynamic styles load_template( get_template_directory() . '/functions/dynamic-styles.php' ); // Load TGM plugin activation load_template( get_template_directory() . '/functions/class-tgm-plugin-activation.php' ); } } add_action( 'after_setup_theme', 'alx_load' );
Since it didn’t work, could someone tell me what I am missing? Thanks so much.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Change language of child theme’ is closed to new replies.