• Resolved Robert

    (@robbieb1953)


    if my theme’s stylesheet template does not contain styles and the last comment says this:

    All styles and js scripts are now loaded in wp_print_style() and wp_enqueue_scripts() in functions.php

    Does this mean that I can’t just make modifications by adding to the end of the sytlesheet?

    For example something like this:

    a {
        color: red;
        text-decoration: none;
    }

    If not, how would I make this same modification in the functions.php template?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    No, it wouldn’t stop you from making modifications in your Child Theme style.css file. You may find that you have to be more specific with your selectors.
    But it does mean if you want to you can dequeue those styles/scripts and enqueue some of your own.

    Thread Starter Robert

    (@robbieb1953)

    Thanks, Andrew. If I make modifications to the css, are these additional dequeue and enqueue actions mandatory or more of a best practice approach?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Neither really, dequeing and enqueing is optional for CSS

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    If you want to modify some JavaScript then you will probably have to dequeue the file and enqueue a file of your own

    Thread Starter Robert

    (@robbieb1953)

    OK, thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘css in functions.php’ is closed to new replies.