[Resolved] Avoid loading style.css of the child theme

Home Forums Support [Resolved] Avoid loading style.css of the child theme

Home Forums Support Avoid loading style.css of the child theme

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1271876
    Kaleem

    Hi, my child theme’s style.css file is empty and I want to avoid loading it.
    I followed this tutorial: https://docs.generatepress.com/article/using-child-theme/#avoid-loading-style-css-of-the-child-theme

    found this code `add_action( ‘wp_enqueue_scripts’, function() {
    wp_dequeue_style( ‘generate-child’ );
    }, 50 );`

    I just want to know two things about the code:
    1. am I pasting the code to functions.php?
    2. do I need to change ( 'generate-child' ) to march the name of my child theme?

    Thank you.

    #1272421
    Leo
    Staff
    Customer Support

    Hi there,

    1. Yes

    2. No I don’t believe so. Try it with generate-child first.

    Let me know 🙂

    #1273081
    Kaleem

    Great! the generate-child did the job.
    Thank you, sir.

    #1273685
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.