-
AuthorPosts
-
February 17th, 2014 at 21:26 #23868Yehonatan Naim
Hi,
How do I make mantra to link style-mobile.css which I have in my mantra-child?
I made a theme child which work well, but when I move to mobile resolution I see the the css point to the file /mantra/style-mobile.css and not /mantra-child/style-mobile.css
Thanks in advanced,
Yehonatan Naim.February 19th, 2014 at 22:58 #23940Yehonatan NaimOK,
I solved this issue…. alot of digging 🙂bottom line, in the Includes dir there is a theme-styles.php file which use the following line to get the style-mobile.php file:
if($mantra_mobile==”Enable”) { wp_register_style( ‘mantra-mobile’, get_template_directory_uri() . ‘/style-mobile.css’ );}
using get_template_directory_uri() function override the theme-child.
in order to refer the theme-child should use get_stylesheet_directory_uri() function..I add to my theme-child the style-mobile.php file with the right function
if($mantra_mobile==”Enable”) { wp_register_style( ‘mantra-mobile’, get_stylesheet_directory_uri() . ‘/style-mobile.css’ );}
now its work 🙂
February 19th, 2014 at 23:02 #23942Yehonatan NaimSorry I wrote the file name wrong… should be theme-styles.php instead of style-mobile.php 🙂
OK,
I solved this issue…. alot of digging 🙂bottom line, in the Includes dir there is a theme-styles.php file which use the following line to get the theme-styles.php file:
if($mantra_mobile==”Enable”) { wp_register_style( ‘mantra-mobile’, get_template_directory_uri() . ‘/style-mobile.css’ );}
using get_template_directory_uri() function override the theme-child.
in order to refer the theme-child should use get_stylesheet_directory_uri() function..I add to my theme-child the theme-styles.php file with the right function
if($mantra_mobile==”Enable”) { wp_register_style( ‘mantra-mobile’, get_stylesheet_directory_uri() . ‘/style-mobile.css’ );}
now its work 🙂
-
AuthorPosts
The topic ‘how to link child theme to child style-mobile.css’ is closed to new replies.