Change child theme
-
I try to use child theme for “Llorix One Lite” theme.I do it step by step using below wordpress ducument.
https://codex.www.ads-software.com/Child_Themes
Nothing works good. there are some problem that t couldn’t fixed it.
1- My website is rtl, as it mention on wordpress documentation I put:
/* Theme Name: llorix-one-lite-child Template: llorix-one-lite */
to rtl.css of child theme and also put:
if ( is_rtl() ) { wp_enqueue_style( 'style-rtl', plugins_url('/rtl.css', TRUE) ); wp_enqueue_script( 'script-rtl', plugins_url('/js/script-rtl.js', TRUE) ); }
to function.php of child theme.
2- I can’t change anythings on style.css of child theme and it seams in everything loaded from parent theme css file. for example I put:
.sticky-navigation .main-navigation a { color: #ffffff; }
on child theme style.css to change the navigaition menu bar but it didn’t work.
Alse I change function.php of child theme as below:
<?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { //wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'rtl-style', get_template_directory_uri() . '/rtl.css' ); wp_enqueue_style( 'admin-style', get_template_directory_uri() . '/css/admin-style.css' ); wp_enqueue_style( 'bootstrap.min-style', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_style( 'font-awesome-style', get_template_directory_uri() . '/css/font-awesome.css' ); wp_enqueue_style( 'font-awesome.min-style', get_template_directory_uri() . '/css/font-awesome.min.css' ); wp_enqueue_style( 'ielt9.css-style', get_template_directory_uri() . '/css/ielt9.css' ); wp_enqueue_style( 'welcome-style', get_template_directory_uri() . '/inc/admin/welcome-screen/css/welcome.css' ); wp_enqueue_style( 'welcome_customizer-style', get_template_directory_uri() . '/inc/admin/welcome-screen/css/welcome_customizer.css' ); } if ( is_rtl() ) { wp_enqueue_style( 'style-rtl', plugins_url('/rtl.css', TRUE) ); wp_enqueue_script( 'script-rtl', plugins_url('/js/script-rtl.js', TRUE) ); } ?>
And style.css as below:
/* Theme Name: llorix-one-lite-child Theme URI: https://www.tarkcigar.com/wp-content/themes/llorix-one-lite-child Description: llorix one lite Child Theme Author: Mohammadreza Fathi Author URI: https://tarkcigar.com Template: llorix-one-lite Version: 1.0.0 License: GNU General Public License v2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready Text Domain: llorix-one-lite-child */ .sticky-navigation .main-navigation a { color: #313131; }
- The topic ‘Change child theme’ is closed to new replies.