WordPress.org

Ready to get started?Download WordPress

Forums

Why did they depricate bloginfo('stylesheet_directory'); (4 posts)

  1. negs
    Member
    Posted 6 years ago #

    I am just complaining, but why did they deprecate bloginfo('stylesheet_directory');

    http://codex.wordpress.org/Template_Tags/bloginfo#Deprecated_Parameters

    I use that all the time. It doesn't help me to have a theme directory because I use a root theme as a template and then have a simple theme which uses the files in the root theme, much like the system in the sandbox theme.

    I want to access my images directory, but I try not to use things that are deprecated! WordPress!! AHHH!

  2. haochi
    Member
    Posted 6 years ago #

    I suppose template_directory does the same thing, doesn't it?

  3. negs
    Member
    Posted 6 years ago #

    Well, sort of, but if you are using theme templates then it gives the wrong directory.

    See what I am talking about regarding theme directories here: Sandbox Theme Templates

    See, most files are kept in a root theme, and then the style and images are in another. It allows me to do variations with colors and slight changes in positioning without having to fully duplicate an entire theme. But 'template_directory' puts me in the directory of the root theme, not the one with the style.css in it.

    Thanks anyway though.

  4. Sam_a
    Member
    Posted 5 years ago #

    You could try <?php dirname( get_bloginfo('stylesheet_url') ); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic