• Resolved Aryan Jaiswal

    (@aryan1432)


    I want to add some customization in the css, so i preferred to use child theme for doing that, but whatever changes I do in Style.css of child theme it does not show up in website, while when I CSS editor of WP customizer, it works, can you plz explain what’s the problem

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi there,

    can you make sure you followed the child theme instructions here and used the child theme ZIP it provided. The CSS style sheet must maintain the original comment header.

    Thread Starter Aryan Jaiswal

    (@aryan1432)

    Yes, I maintained the CSS header.

    Fill tell, if I have to change any thing here.
    This is the style.css header,
    /*
    Theme Name: GeneratePress Child
    Theme URI: https://generatepress.com
    Description: Default GeneratePress child theme
    Author: Tom Usborne
    Author URI: https://tomusborne.com
    Template: generatepress
    Version: 0.1
    */

    And this is what inside the functions.php

    <?php
    /**
    * GeneratePress child theme functions and definitions.
    *
    * Add your custom PHP in this file.
    * Only edit this file if you have direct access to it on your server (to fix errors if they happen).
    */

    function generatepress_child_enqueue_scripts() {
    if ( is_rtl() ) {
    wp_enqueue_style( ‘generatepress-rtl’, trailingslashit( get_template_directory_uri() ) . ‘rtl.css’ );
    }
    }
    add_action( ‘wp_enqueue_scripts’, ‘generatepress_child_enqueue_scripts’, 100 );

    Theme Author Tom

    (@edge22)

    Thread Starter Aryan Jaiswal

    (@aryan1432)

    Tom, the problem is still not solved, I added the code in functions.php of child theme.

    Theme Author Tom

    (@edge22)

    Any chance you can link us to your website so we can take a look?

    Thanks!

    Thread Starter Aryan Jaiswal

    (@aryan1432)

    Yes, of course.

    Check it here.

    Still, working????

    Theme Author Tom

    (@edge22)

    What if you increase the 99 to something like 999?:

    add_action( 'wp_enqueue_scripts', function() {
        wp_dequeue_style( 'generate-child' );
        wp_enqueue_style( 'generate-child', get_stylesheet_uri(), array(), filemtime( get_stylesheet_directory() . '/style.css' ), 'all' );
    }, 999 );

    That should move it all the way to the end.

    Thread Starter Aryan Jaiswal

    (@aryan1432)

    Nothing changes, problem is still there.

    Hi there,

    i just checked your site and the Child Theme style sheet is loading after all other Theme styles. The only CSS that comes after it is the Customizer > Additional CSS.

    Thread Starter Aryan Jaiswal

    (@aryan1432)

    Sorry, the mistake was mine, by mistake i left “/*” CSS comment open and forgot to close it.
    And this happend.

    SORRY, ??.

    Theme Author Tom

    (@edge22)

    Glad you got it sorted! ??

    Thread Starter Aryan Jaiswal

    (@aryan1432)

    Thanks for your great support??

    Theme Author Tom

    (@edge22)

    No problem! ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘changes made in style.css of child theme are not displayed.’ is closed to new replies.