SEO BLOG

Search & Social Media Survival Guide

Take note: DM-Bloodless support has been discontinued by the author long ago. For great WordPress themes try Themeforest [partner-link]. Check out PIM, Deadline or TutsPlaza [partner-links] instead.

I fixed DM-Bloodless! Well, kudos to Deaf Musician for this lovely black and white WordPress theme. As it’s his first one he overloooked something. It caused an ugly error that was difficult to locate without prior knowledge of WordPress or PHP.

The dreaded “Warning: Cannot modify header information – headers already sent” error was produced by the functions.php

As stated in the WordPress Forum here every page of the internal WordPress code has to start with a “<?php” without prior spaces or blank lines. Also, no white space is allowed after the closing tag “?>”.

Moreover you have to use one PHP block for all PHP code, unlike now where every function has it’s own block with, of course, white space in it.

You can substitute your old one in the dmbloodless folder. Coded correctly, it looks like that:

<?php

/*

Template Name: Functions

*/

include(dirname(__FILE__).’/themetoolkit.php’);

themetoolkit(

‘dmbloodless’,

array(

‘about’ => ‘About This Blog {textarea|3|50} ## Keep it so it fits on one line.’,

‘style’ => ‘Theme Color Option {radio|bw|Black On White|wb|White On Black}’,

),

__FILE__

);

function dmbloodless_about() {

global $dmbloodless;

print $dmbloodless->option['about'];

}

function dmbloodless_style() {

global $dmbloodless;

$dmb_style = $dmbloodless->option['style'];

return $dmb_style;

}

if ( function_exists(‘register_sidebar’) ) {

register_sidebar(array(‘name’=>’Sidebar 1′,

‘before_widget’ => ‘<div id=”%1$s” class=”data %2$s”>’,

‘after_widget’ => ‘</div>’,

‘before_title’ => ‘<div class=”titles”>’,

‘after_title’ => ‘</div>’,

));

register_sidebar(array(‘name’=>’Sidebar 2′,

‘before_widget’ => ‘<div id=”%1$s” class=”data %2$s”>’,

‘after_widget’ => ‘</div>’,

‘before_title’ => ‘<div class=”titles”>’,

‘after_title’ => ‘</div>’,

));

}

/* default values upon theme install */

if (!$dmbloodless->is_installed()) {

$set_defaults['about'] = ‘Write something about your blog, see theme options for more.’;

$set_defaults['style'] = ‘bw’;

$result = $dmbloodless->store_options($set_defaults);

}

?>

Last updated: October 7th, 2010.

Related posts:

  1. DM-Bloodless IE 6 Sidebar Incompatibility Problem Discovered and Solved
  2. Saturday Night Fever for WordPress Theme Customization: How to Simplify
  3. How to Remove utm_source & Other Parameters From Your URLs
  4. Quit SEO, Use WordPress
  5. Blog Rock & Roll

July 20, 2007 | You can follow comments through the RSS 2.0 feed. You can leave a comment, or trackback.

Need help? Consider a world class blog & SEO consultation by the author of SEO 2.0, Tad Chef. For full fledged SEO services like ongoing link building, contact my partners from SEO.com or look up my directory of SEO service providers and checkout reputable companies like Datadial or Redfly.

Already an SEO? Consider applying to be added to my exclusive SEO agency directory. Only selected companies get included. Find out whether you are eligible to submit your site.

This thing has 5 Comments

  1. Deaf Musician
    Posted July 20, 2007 at 18:48 | Permalink

    Sweeeeeet! Thanks a lot, man!

  2. onreact
    Posted July 20, 2007 at 20:52 | Permalink

    Well thank you for making this blog possible. Before, I was convinced that I have to create a theme of my own to suite my needs…

  3. Amy
    Posted March 9, 2008 at 23:11 | Permalink

    Hi there,

    Thank you so much for this fix — if I can get it working, dmbloodless would work beautifully for my blog.

    Unfortunately, I bollixed up the repair somehow so if you tell me what I did wrong or otherwise, send me the proper functions.php as an email attachment, I would love that. (I also posted this query to deadmusician a few days back but haven’t received an answer).

    Here’s what I did:

    1. cut & paste fix shown above into a blanked out version of the original functions.php, hit save.
    2. Get error message there are characters that cannot be saved in Ansi, so I choose Unicode, which crashes my website.
    4. Try again, saving it in Ansi, receive error message stating: Parse error: syntax error, unexpected T_STRING, expecting ‘)’ in /home/myusername/public_html/myblog/wp-content/themes/dmbloodless/functions.php on line 17

    So yes, I’m a lamer at a total loss, but do please forgive me a little, as I am in my forties, i.e., dodderingly ancient in blogger terms.

    Many thanks for your help!

  4. Amy
    Posted March 9, 2008 at 23:13 | Permalink

    oh, and if anybody else wants to write to me about this, I can be reached at:

    amysemail
    AT
    gmail
    DOT
    com

    Thanks again.

  5. Matt
    Posted January 20, 2009 at 00:32 | Permalink

    Thank you so much for this, the easy cut and paste instructions are a life saver!

This thing has 4 Trackbacks

  1. Posted July 24, 2007 at 16:02 | Permalink

    [...] The nice folks at SEO Refugee, my favorite SEO Forum in this universe reviewed my new SEO 2.0 blog. As I value their opinion very much I reacted quickly. One problem mentioned where empty categories leading to a funny but cryptical 404 message devised be the Deaf Musician for the DM Bloodless theme. [...]

  2. SEO 2.0 | Free Custom Wordpress Theme
    Posted July 26, 2007 at 12:14 | Permalink

    [...] Musician, author of the great minimalistic WordPress theme DM Bloodless that I use offers to create a custom WordPress Theme for a passionate blogger for free! I wonder [...]

  3. Posted August 6, 2007 at 21:33 | Permalink

    [...] care of the SEO of your site, use a black and white theme. Do not stuff your pages with thousands of widgets and buttons. Leave plenty of white space. Make [...]

  4. Posted August 20, 2007 at 18:21 | Permalink

    <p>[...] a small del.icio.us widget in my footer I noticed that my theme, DM-Bloodless, which I consider the best black/white WordPress theme of all times, has a minor [...]</p>

Post a Comment

Please mind the commenting netiquette, most notably:

  • A "name" is a real name or nick name, not a keyword! SEO Company is wrong. John Doe of Google is OK.
  • For the "website" URL: No deep links allowed unless it's your "about" page.
  • No extra signature allowed, one "website" link is enough.
  • No bot-like "Thank you" comments with no context or added value to the post.

Your email is never published nor shared. Required fields are marked *

*
*