Support » Themes and Templates » Change get_bloginfo(‘stylesheet_directory’) and stylesheet_url?

  • Good Morning!

    I am testing out a theme but I noticed all of the CSS files are in the main theme folder, rather than in a CSS folder inside the theme folder.

    I can easily move the CSS files into a CSS folder, and change the header.php reference to the CSS files, but throughout all of the files their are several references to: get_bloginfo(‘stylesheet_directory’) and stylesheet_url.

    Where would I go to change the directory stored in those variables? In a file or in the database and if so where abouts? Thanks in advance!

    Christopher Beckwith

Viewing 1 replies (of 1 total)
  • Each variable is assembled differently, best way is to just do a ‘find’ inside your wordpress code to see what filters are called, and then just addfilter.

    Try something like this in your functions.php, to change stylesheet_url

    add_filter(“stylesheet_uri”, “blogo_stylesheet_uri”);

    /** This changes the stylesheet to style.php instead of style.css */
    function blogo_stylesheet_uri(){
    $stylesheet_dir_uri = get_stylesheet_directory_uri();
    $stylesheet_uri = $stylesheet_dir_uri . “/style.php”;
    return $stylesheet_uri;

Viewing 1 replies (of 1 total)
  • The topic ‘Change get_bloginfo(‘stylesheet_directory’) and stylesheet_url?’ is closed to new replies.