WordPress.org

Ready to get started?Download WordPress

Forums

Style Switcher (8 posts)

  1. mattmend
    Member
    Posted 10 years ago #

    Hi -
    I'd been successfully using the style switcher plugin from Alex King until I used a WordPress work-around to put my index page in the root of my server while leaving wordpress in a sub-directory. The style switcher now fails to work even though I've copied the wp-styles folder to the root along with index.php. When one attempts to change styles, the plugin thinks the index of the site is still located in /wordpress even though in options, the blog address is set properly. Any idea what change(s) I could make to wp-style-switcher.php to work around this? I believe the plugin may be looking at wordpress address as opposed to blog address which is why it's failing.
    Any info would be helpful.
    Regards -
    Matt

  2. Beel
    Member
    Posted 10 years ago #

    I posted some stuff on issues like this, just do a search, but in all likelihood you need to delete your cookies.

  3. southerngal
    Member
    Posted 10 years ago #

    You probably need to put the style switcher in the same directory as your WP. :)

  4. mattmend
    Member
    Posted 10 years ago #

    wp-style folder (containing style CSS) is in the same directory but wp-style is a plugin. Can't very well move that to the root directory.
    Deleting cookies didn't help. The links to the style sheets are still pointing to /wordpress/index.php. I'll have another search through the forums.
    Matt

  5. anatman
    Member
    Posted 10 years ago #

    get_settings('siteurl') returns the installation url, get_settings('home') returns the blog url.

  6. Anonymous
    Unregistered
    Posted 10 years ago #

    I use the style switcher, and my blog is in the root. The wp-style folder is under the wordpress folder. The individual style folders are under wp-style. http://www.chasingthewind.net
    In my index.php, I have this:
    <style type="text/css" media="screen">
    /* @import url( <?php echo get_settings('siteurl'); ?>/wp-layout.css );
    Original line deactivated for Alex's Style Switcher below */
    @import url( <?php wp_stylesheet("BlueSwirly"); ?> );
    </style>

    That sets the default style.
    In my wp-style-switcher.php file, I made several changes to change references from ('siteurl') to ('home'). Line 27, 37, and 105 were changed this way.
    Line 65 I changed the path to "wordpress/wp-style/" instead of "wp-style/"
    I think that was all the changes.

  7. Sphyr
    Member
    Posted 10 years ago #

    That last post was me. :/

  8. mattmend
    Member
    Posted 10 years ago #

    Thanks alot. This was the perfect solution.
    Really appreciate it.
    Matt

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.