Support » Networking WordPress » Cannot modify header information – headers already sent by : unsolvable ?

  • I use the short and sweet code to publish my blogs on external pages.

    I had an earlier error stating that the wp-blog-header.php could not be found.
    Since I am using a multisite installation with subdirectories, I cleaned it up


    /* Short and sweet */
    define('WP_USE_THEMES', true);


    /* Short and sweet */
    define('WP_USE_THEMES', true);

    That error was gone but I got a new one:

    Warning: Cannot modify header information - headers already sent by (output started at C:\domains\\wwwroot\testnews.php:95) in C:\domains\\wwwroot\login\wp-includes\ms-settings.php on line 101

    When I open the testnews.php page and look at rule 95, it’s a javascript “collide and collapse”. Can’t think of this being the cause ? the rule in bold is nr.95

    <script type="text/javascript">
    //Initialize first demo:
    	headerclass: "itemhead", //Shared CSS class name of headers group
    	contentclass: "storycontent", //Shared CSS class name of contents group
    	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover"
    	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
    	<strong>collapseprev: false, //Collapse previous content (so only one open at any time)? true/false </strong>	defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content.
    	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
    	animatedefault: false, //Should contents open by default be animated into view?
    	persiststate: true, //persist state of opened contents within browser session?
    	toggleclass: ["", "openentry"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
    	togglehtml: ["none", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
    	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
    	oninit:function(expandedindices){ //custom code to run when headers have initalized
    		//do nothing
    	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
    		//do nothing

    anyone got an idea what I can do to fix this ?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    Moving to MultiSite – There’s no way for your short-n-sweet code to know which blog on your multisite it should be pulling data from, so this would never work anyway.


    so, I have been trying for days to get the multisite running, and now there’s no way to have these blogs show up in an external site ?

    None whatsoever ?

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    Well not like THAT, no. There may be a way to do it…

    What sort of integration are we talking about here?

    You’ve got a subfolder install and you want posts from a specific site to show up outside WP, or you just want the theme to copy over?

    there are 4 subfolder installations,,,,

    They are blogs, and I wish to use them to easily update my pages on my website.

    So the content of the blog .com/login/news, should show up (in the end) on .com/news.php.

    The old way was to have 4 different installations for each blog, using the the 4 different wp-blog-header.php files.

    Now the blogs are under one dashboard, a network, to help simplify things and not needing to log out and in 4 times.

    Since I just succeeded in making a network installation I need to figure out a way of letting them show up again on those pages.

    The old way this was configured was with the short and sweet code,
    so since this is no longer an option, due to the error above…

    the posts of the blog should show up on the corresponding external website page, using the configurations set in the theme.

    There are a few differences in some as the way archives are set.
    Each subdirectory has it’s own theme configured.

    what you see here

    should show up here, combined with the css rules and theme archive settings

    the way it looks here

    (this page is running on the php code, on a previous install of wordpress located in

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    Wait. Are those all SEPARATE installs?

    You shouldn’t have been able to make<subsites&gt; AND (unless you mean login/events)

    Realistically, you’re doing this ‘wrong’ (and I’m using that term VERY loosely!). You should be using WordPress to actually run your site, if you want it to run your site, and redirect the old URLs to the new ones.

    If you just want the news, I’d consider using an RSS importer to pull things in.

    in the are 4 seperate installations of wordpress, yes. shows the contents via via via via

    the php pages use the short and sweet code and call each time for the wp-blog-header.php files in the newz, diary, media and tours folders.

    and yes, sorry, typo; it should be login/events…

    That’s how I got it working.

    So naturally I tried doing the same with the new installation but there was a slight hickup.
    So under the are now 4 subdirdectories, which I importerd the content to.

    So now I want to have the php files show the content from the new installation via via via via

    the short and seet code can not work since the wp-blog-header.php is not in those folders as they are virtual, so I used the only existing file in the root install,

    When I do this, I get the error message from my first post.

    OK, rss importer.
    A plugin I presume ?

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    I’m sure doing what you want there is possible but it’s “The hard Way” and it’s going to be fraught with problems.

    Your issue is that when you call the wp-blog-header.php file, you’re not telling it which block you’re trying to grab the header info from. And I don’t know if you can.

    RSS importing into a page is pretty straight forward, I used to do that all the time. You can find a lot of good tutorials on Google.


    been working on that rss feed.
    I nearly got there but I get a blank page (the stripped down version) or absolutely nothing on the testnews.php page.

    can you pinpoint the cause ? I used the simplepie plugin.

    here’s the page as it is now

    now leaving for home so will post some additional info when I get home if needed.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Cannot modify header information – headers already sent by : unsolvable ?’ is closed to new replies.