ThemeShaper Forums » Thematic


Child theme breaks, wp_head

(5 posts)
  • Started 10 years ago by rgb_life
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. Hi everyone. This is my first post.

    I've recently broken into using Thematic. It's a beautiful theme visually, and structurally. It looks so easy to modify, once you get the hang of hooks and filters.

    Here's my problem:
    I'm using WP v3.1.4 and Thematic v0.9.7.7
    After making my child theme with NOTHING in functions.php, I've tried adding one function to make a favicon:

    function my_favicon(){
    echo '<link rel="shortcut icon" href="'

    add_action('wp_head', 'my_favicon');

    (I wrote this from memory, so some syntax might be slightly off, but It was taken from Sitepoint's "Wicked WordPress Themes" book and I followed it to the letter in my child theme)

    When I refresh the page, it shows the favicon beautifully.
    THEN... anytime I try to add/edit a post or page, the site dies and I cannot access the admin panel any longer.

    I get this error message "cannot modify the head..."

    Posted 10 years ago #
  2. Oops, I accidentally added a second post...

    Thanks in advance for your time.

    Posted 10 years ago #
  3. middlesister

    I guess you are seeing a "cannot modify header information – headers already sent" error?
    In that case, make sure there is no whitespace before your opening <?php tag in your functions.php.

    Posted 10 years ago #
  4. I'll try that out. Thanks a lot!

    So, in functions.php, is is safe to place ALL of the functions within one set of
    <?php ?> tags?

    Posted 10 years ago #
  5. do get yourself the latest version of thematic

    middlesister is correct in pointing out that that particular error is often due to having extra white space before your opening <?php tag or after your closing ?> tag. ie... the first and last ones in the file. you can open and close them as many times as you want, but there can't be white space at the end or PHP will choke.

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.