Support » Themes and Templates » css links: hard coded vs bloginfo( 'stylesheet_url' )

  • I am in the process of moving from MovableType to WordPress.

    What are the trade offs between using bloginfo( 'stylesheet_url' ) and hand coding links to style sheets in the header.php file?

    I am currently working on a template that I will use only for my own site. I prefer to edit the source files directly for things like html and css and use the CMS software for managing the content. When I am setting things up for other people to use and manage, I try to make sure that they can make full use of software tool (ie WordPress) to manage as many aspects of the site as possible. I suspect that using bloginfo( 'stylesheet_url' ) falls into this dilemma.


Viewing 2 replies - 1 through 2 (of 2 total)
  • bloginfo(‘stylesheet_url’) is just a dynamic way to point to the directory in which your active stylesheet resides. The main advantage to using this is that if you move the theme to a different url (for example, transferring from a development site to a “live” site), you need only update the database, and any links in the theme files that are using bloginfo(‘stylesheet_url’) will still work.

    OK, so that makes a lot of sense for theme development so that the end user doesn’t need to set the path by hand. In the case of my personal site, making the choice to hand jam the URLs for the style sheets shouldn’t incur any drawbacks.

    Further feedback still appreciated. GraphicGeek, thank you very much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘css links: hard coded vs bloginfo( 'stylesheet_url' )’ is closed to new replies.