THIS THREAD HAS BEEN CLOSED.

[Tut] Adding new custom css file for mobile version

Updated on Jul 4, 2016 in ForumEngine
0 on Jul 4, 2016

This tutorial to add a custom css file for only mobile version

1)Add this code into child-theme/functions.php file

 

add_action( 'wp_enqueue_scripts', 'cs_add_mobile_css' );
function cs_add_mobile_css(){
 
 if( et_load_mobile () ){
  wp_enqueue_style( 'cs-mobile-style', get_stylesheet_directory_uri().'/custom_mobile.css' );
 }
}

2) Create new  custom_mobile.css in child-theme directoy( are the same level with functions.php file).

 

Tag: Custom css file, Mobile css file, Mobile style

 

 

 

  • Liked by
Loading more replies
Posting & Replying function will be deactivated from 3pm GMT+7 12th Sep.
Read More