WordPress.org

Ready to get started?Download WordPress

Ideas

Move Stylesheet to Functions File

  1. New Nine Media
    Member

    We have these great functions wp_register_style, wp_enqueue_style, and wp_print_styles to load stylesheets, but the default themes continue to hardcode the stylesheet into header.php. Why don't we move the stylesheet to functions.php which will serve two purposes:

    • it will help (read: force) designers/developers to learn these functions by introducing them to the code (and they'll eventually thank you for it), and
    • it will help plugin authors load styles before and after the general stylesheet to allow for more flexibility when offering what can and can't be customized in their plugins' output.
    Posted: 2 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    13 Votes
  • Status

    This idea is under consideration