Site logo

Archived topic

Where to upload custom .css files

2 replies · Started by Antonio on December 6, 2017

Viewing posts 1–3 of 3

Hi all 🙂

Small question:

Where can I upload my custom .css files (via FTP) and be sure that they will not be lost when I update the GeneratePress theme?

Can I place them in my the Generate Press css folder?

I would like to link my own CSS files in the Hooks without write my own CSS directly in WordPress or by using some external Plugins for CSS.

Note: my CSS code is larger than 1500 lines, so the Simple CSS Plugin from Tom is not an option, even if I love it 🙁

Thanks in advance

Then in your child theme functions.php, you would need to enqueue your CSS file:

add_action( 'wp_enqueue_scripts', 'tu_child_theme_enqueue' );
function tu_child_theme_enqueue() {
    wp_enqueue_style( 'child-theme-style', get_stylesheet_directory_uri() . '/custom.css');
}
This archived topic is closed to new replies.