Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: function.php adding style-mobile.css child theme

Discussion in 'Misc WordPress Requests' started by marcinstanczak, Oct 30, 2017.

  1. marcinstanczak

    Guest

    Reply To: function.php adding style-mobile.css child theme, by marcinstanczak

    I cant do that because my theme doesnt support that… When I change something in style.css what is in style-mobile.css it just doesnt work… I try :first-child and others and nothing work…
    Now I change to function.php like I found in codex

    <?php
    /**
    *Recommended way to include parent theme styles.
    *(Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
    */

    add_action( 'wp_enqueue_scripts', 'child_style' );
    function child_style() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',get_stylesheet_directory_uri() . '/style.css',array('parent-style'));
    wp_enqueue_style( 'child-style',get_stylesheet_directory_uri() . '/style-mobile.css',array('parent-style'));
    }

    /**
    *Your code goes below
    */

    Reply To: function.php adding style-mobile.css child theme
     
    #1

Share This Page

Web Hosting