WordPress.org

Forums

blanks in theme folder name (possible bug?) (3 posts)

  1. heddesheimer
    Member
    Posted 1 year ago #

    I found a possible bug when developing themes. One of my clients use a theme with a blank in the folder name like this:

    /wp-content/themes/Theme Name/

    Which works fine so far, but each time I try to call up the theme directory uri like with get_stylesheet_directory_uri() I will get it like this:

    http://.../wp-content/themes/ThemeName

    instead of

    http://.../wp-content/themes/Theme Name

    or

    http://.../wp-content/themes/Theme%20Name

    Not sure if this is a bug. It can be solved easily by renaming the theme folder (like replacing the space with hyphen or underscore), but it took me a while to find out that this was the problem, so maybe it might be helpful to know (or maybe fix it in the next version).

    Thanks
    Marian

  2. WPyogi
    Forum Moderator
    Posted 1 year ago #

    You should not use spaces in theme folders -

    http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme

  3. shadez
    Member
    Posted 1 year ago #

    Marian,
    That API returns a URI and not a URL. :p
    But yes, this post may help someone someday maybe. :)

Topic Closed

This topic has been closed to new replies.

About this Topic