Home Forums WoodMart support forum Child theme Style.css not working

Child theme Style.css not working

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #252620

    katyp
    Participant

    Hey,

    I have installed the child theme and everything is working fine, the functions.php in child theme is being executed & the website works fine.

    I had some code in my Appearance-> Additional CSS. But when I move that code to my child theme/style.css then it does not work

    Any help?

    #252669

    Hello,

    You should go to Theme Settings >> Custom CSS and paste the Custom CSS code in the particular section from where you want to apply the custom CSS code. This custom CSS, you will never lose after the theme update.

    Best Regards.

    #252677

    katyp
    Participant

    Yes that’s fine but how do I add it to my style.css
    And why is the style.css not loading the code I am adding in there

    #252693

    Hello,

    Can you please send me the code which is not working after adding in the Style.css file also, please share the WP admin login details of your site so I will check and give you the possible solution.

    Best Regards.

    #252939

    katyp
    Participant

    Hey,

    Unfortunately it would be tough to share the credentials. But I’ll attach the screenshots to make it more clear.

    The CSS I am adding to the child theme does not work as shown in the screenshot “child-theme”. (Doesn’t matter what code I add, whatever css rules I add aren’t read)

    But the same code works fine if I add it in the Appearance-> Customize -> Additional CSS

    How can I make the child theme style.css work? I see that it’s Enqueued in the functions.php as well.

    Attachments:
    You must be logged in to view attached files.
    #252955

    Hello,

    I saw the screenshot you attached.

    It seems that you’re not enqueuing the stlye.css file correctly that’s why it’s not working. Please try enquing the style.css again then clear cache and check back.

    You can read the following article for further help:
    https://developer.wordpress.org/themes/advanced-topics/child-themes/

    If you are still unable then it is necessary for you to provide me with admin panel login details of the website to check it myself and help you out accordingly.

    Regards.
    Xtemos Studios.

    #252994

    katyp
    Participant

    This is the code that’s present in my child theme’s functions.php

    /**
     * Enqueue script and styles for child theme
     */
    function woodmart_child_enqueue_styles() {
        wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'woodmart-style' ), woodmart_get_theme_info( 'Version' ) );
    }
    add_action( 'wp_enqueue_scripts', 'woodmart_child_enqueue_styles', 10010 );
    #253031

    Hello,

    I saw the screenshot you attached.

    Please provide the admin panel login details of the website to check it myself and help you out accordingly.

    Regards.
    Xtemos Studios.

Tagged: , ,

Viewing 8 posts - 1 through 8 (of 8 total)