Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

[Support request] Where to upload custom .css files

Home Forums Support [Support request] Where to upload custom .css files

Home Forums Support Where to upload custom .css files

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #443123
    Antonio

    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

    #443238
    Leo
    Staff
    Customer Support
    #443239
    Tom
    Lead Developer
    Lead Developer

    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');
    }
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.