Support » Plugins » style.css and images folder – where should they go?

  • Resolved deko


    The location for my stylesheet and images folder is:


    But if I have other, non-wp pages on my site, I will want ANOTHER stylesheet and images folder for the non-wp stuff, such as:




    The problem is this kind of redundancy (two stylesheets, two images folders) is generally a bad idea.

    Would it not be better to consolidate into ONE stylesheet and ONE images folder? After all, my non-wp pages share most of the style directives and images in my-wp-theme.

    The challenge is that WordPress has various bits of code that uses the default location (my-wp-theme folder) when referencing the stylesheet and images.

    The question is this:

    Do I (a) point my non-wp pages to the stylesheet and images folder in my-wp-theme folder, or (b) hack wp-includes/functions.php so all my WordPress content references a centralized stylesheet and images folder in my site’s root directory?

    If I could discover the right hack, I think I’d like to go with (b).

    Other suggestions?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I don’t see the problem with using /public_html/my-style.css for your second stylesheet and /public_html/wp-content/themes/my-wp-theme/images for all images.

    The problem is redundancy. Repeated code is always a bad idea.

    But I’m still thinking about this.

    (I’m anticipating someone suggesting using Pages instead of non-wp pages, but that’s not a solution: I need non-wp pages on this site.)

    In any case,

    If I (a) point to the default wp locations for images and style there is less hacking (which is good).

    But my theme is custom anyway – so why not (b) point wp-content to a central public_html/images and public_html/style.css… this way my site is not so tightly coupled (which is bad) with wp…

    hmmm… maybe having two stylesheets is not so bad.

    Whatever is unique to non-wp pages can go in /public_html/my-style.css (as joshziman suggested), and I just reference two sytlesheets in my non-wp pages.

    As for the images folder, I think I’m going to centralize it. This means hard-coding a path rather than using

    <?php bloginfo('stylesheet_directory'); ?>

    but so what…

    *EDIT* I dunno anymore, this is becoming more complicated then need be lol!!

    Personally I’d just make their own image and CSS file locations, for the non-WP pages that is.. However, there is no need to make TOO MUCH work for yourself.. =P

    The second way of doing it, which you mentioned as (b), is MORE work on yourself then need be..I wouldn’t do that. =P


    I dunno, but for the non-WP files, I would add the CSS link location in it’s header, along with the path to it’s own image folder..

    Yes, the less coding the better, to be sure. That’s a good point.

    So I think my (c) idea is the winner – just reference two stylesheets in the non-wp pages – with public_html/my-style.css containing only unique directeives for non-wp pages – and centralizing the images folder (all images, both wp and non-wp) in the site’s root.

    Thanks for the help 🙂

    Thanks for the help 🙂

    No problem. =) I’m not sure if *I* was much help, but…I’m glad to been able to throw in my opinions and or suggestions.. =P


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘style.css and images folder – where should they go?’ is closed to new replies.