WordPress.org

Ready to get started?Download WordPress

Forums

WP Style Switcher problems :/ (9 posts)

  1. Syphon
    Member
    Posted 10 years ago #

    OK see the error in action here http://syphon.mpcdownloads.com
    Try to change the style...at the top of the page you should see the error:
    Warning: Cannot modify header information - headers already sent by (output started at /home/syphon/public_html/index.php:4) in /home/syphon/public_html/wp-content/plugins/wp-style-switcher.php on line 36
    Warning: Cannot modify header information - headers already sent by (output started at /home/syphon/public_html/index.php:4) in /home/syphon/public_html/wp-content/plugins/wp-style-switcher.php on line 37
    These two lines in question are:
    );
    header("Location: ".get_settings('siteurl'));
    The wierd thing is, the default theme loads fine, as if there is no problem with it, but the other styles do not load at all! Also when you click to change the style, the default does not develop a hyperlink so there is no way of changing back! I asked Alex but he pointed me over here saying that he thinks that I have put unnecessary line breaks in the wp-style-switcher.php, but I haven't edited this file at all!

  2. Syphon
    Member
    Posted 10 years ago #

    Nope there is none :(
    If I change the style selector to showing samples, the sample .gif shows up so it can't be a problem with reading from the directory surely?

  3. Beel
    Member
    Posted 10 years ago #

    I know you looked but most likely it is a problem with whitespace in the plugin. Use an editor other than Notepad and again make sure there are no spaces before <?php and after ?>

  4. Syphon
    Member
    Posted 10 years ago #

    I am using the .php as it comes from Alex's website so that really can't be the problem unless that file is screwed.

  5. Mark (podz)
    Support Maven
    Posted 10 years ago #

    What's on line 4 of your index.php ?

  6. shadow
    Member
    Posted 10 years ago #

    Just a thought
    Have you checked to make sure your style.css is in your relevant directories?
    I tried to access http://syphon.mpcdownloads.com/wp-style/wp-rebelpixel/style.css and could not get to the file but it is working in the pre-defined blue fade directory for instance.

  7. Syphon
    Member
    Posted 10 years ago #

    Mine looks like this:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <?
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>
    <title>James’s Weblog</title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    <style type="text/css" media="screen">
    @import url( <?php wp_stylesheet(); ?> );
    </style>

  8. Syphon
    Member
    Posted 10 years ago #

    Haha changed it to what you provided Beel and it works perfectly :D Thank you guys all so much you're the best!

  9. akc
    Member
    Posted 9 years ago #

    Read this if your index.php is UTF-8 encoded:

    Having just solved the exact problem but using a solution not mentioned here, I thought I'd jot down the solution for posterity :) I use WP 1.2.1.

    Make sure your text editor is not writing BOM header to your UTF-8 file! For example, in a power editor like UltraEdit, the configuration setting lets you turn this feature on or off.

    After reconverting my index.php to UTF-8 without BOM header, the annoying "header already sent" was gone. Hurray!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.