ThemeShaper Forums » Thematic

[closed]

Favicon snippets not working

(6 posts)
  • Started 5 years ago by diana
  • Latest reply from Chris
  • This topic is not resolved

Tags:

  1. diana
    Member

    I've found a couple ways of adding my favicon to my Thematic child theme:
    http://forums.themeshaper.com/topic/adding-a-favicon-with-a-child-theme#post-249
    http://forums.themeshaper.com/topic/header-image-primary-and-secondary-asides#post-1242

    Both options have resulted in my site ceasing to load in FF 3.5, Opera 10, Chrome 3, and IE 5.5-8 (via IE Tester).

    Here's my functions.php without either favicon snippet.

    <?php

    // removes blog-description
    function no_blogdescription() {
    remove_action('thematic_header','thematic_blogdescription',5);
    }
    add_action('init', 'no_blogdescription');

    // creates a header widget area
    function my_widgets_init() {
    register_sidebar(array(
    'name' => 'Header Aside',
    'id' => 'header-aside',
    'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
    'after_widget' => "",
    'before_title' => "<h3 class=\"widgettitle\">",
    'after_title' => "</h3>\n",
    ));

    }
    add_action( 'init', 'my_widgets_init' );

    // adds the header widget area to the child theme
    function my_header_widgets() {
    if ( function_exists('dynamic_sidebar') && is_sidebar_active('header-aside') ) {
    echo '<div id="header-aside" class="aside">'. "\n" . '<ul class="xoxo">' . "\n";
    dynamic_sidebar('header-aside');
    echo '' . "\n" . '</div><!-- #header-aside .aside -->'. "\n";
    }
    }
    add_action('thematic_header', 'my_header_widgets', 8);

    // loads alternative stylesheet
    function my_stylesheet($content) {
    global $wp_query;
    if (is_page()) {
    $pageID = $wp_query->post->ID;
    if ($pageID == '66') {
    $content = "\t";
    $content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"";
    $content .= get_bloginfo('stylesheet_directory') . "/style-portfolio.css";
    $content .= "\" />";
    $content .= "\n\n";
    }
    }
    return $content;
    }
    add_filter ('thematic_create_stylesheet', 'my_stylesheet')

    ?>

    Posted 5 years ago #
  2. Just drop the favicon.ico file into the root directory.

    Chris

    Posted 5 years ago #
  3. diana
    Member

    I have that. No joy.

    Seems to me that a missing .ico file would explain why the image wouldn't show up, not why the site would break.

    Posted 5 years ago #
  4. Did a test with the code listed in the first post and a non existing .ico file. And my blog won't break.

    What do you mean by the site would break?

    Posted 5 years ago #
  5. diana
    Member

    To be more specific, pages wouldn't load. Blank pages instead. No error message.

    Posted 4 years ago #
  6. Hi,

    this is a php error. You broke the php structure while embedding the code snippet. Could you please send your functions.php to chris (at) wupperpiraten (dot) de

    Chris

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.