Site logo

Archived topic

Add stylesheet

1 reply · Started by cpalo on January 6, 2021

Viewing posts 1–2 of 2

Hello
I will want to get my SimpleCss as a base for other sites.
So I thought about copying the content into a custom.css stylesheet.
And in the other sites, I thought I would call it by
wp_enqueue_style (custom.css)
is it correct?

Hi,

Yes wp_enqueue_style() is the correct function but you'll have to point the command to the right file path.

You'll have to upload the file custom.css to your child theme's assets/css folder and copy its path which you'll have to add within the wp_enqueue_style().

Read more about the command here:
https://developer.wordpress.org/reference/functions/wp_enqueue_style/

This archived topic is closed to new replies.