ThemeShaper Forums » Thematic

[closed]

Something wrong in functions.php

(3 posts)
  • Started 11 years ago by dainius
  • Latest reply from dainius
  • This topic is not resolved
  1. Hello, folks.
    Last week i downloaded Power Blog theme from Ian's page (http://themeshaper.com/thematic-power-blog-theme/).
    Everytime, I try to modify functions.php file, i gen an errorr:
    Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/domain.lt/httpdocs/wp-content/themes/blog-thematic/functions.php:1) in /var/www/vhosts/domain.lt/httpdocs/wp-content/plugins/what-would-seth-godin-do/what_would_seth_godin_do.php on line 124
    The same problem when i swiched back to simple thematic child theme based on thematic sample.

    I can't find any mistake, maybe you can help. Thanks a lot.

    <?php
    //
    // Custom Child Theme Functions
    //
    // I've included a "commented out" sample function below that'll add a home link to your menu
    // More ideas can be found on "A Guide To Customizing The Thematic Theme Framework"
    // http://themeshaper.com/thematic-for-wordpress/guide-customizing-thematic-theme-framework/

    // Adds a home link to your menu
    // http://codex.wordpress.org/Template_Tags/wp_page_menu
    //function childtheme_menu_args($args) {
    // $args = array(
    // 'show_home' => 'Home',
    // 'sort_column' => 'menu_order',
    // 'menu_class' => 'menu',
    // 'echo' => true
    // );
    // return $args;
    //}
    //add_filter('wp_page_menu_args','childtheme_menu_args');

    //add favicon
    function childtheme_favicon() { ?>
    <link rel="shortcut icon" href="/files/2009/10/premaman.ico" />
    <?php }
    add_action('wp_head', 'childtheme_favicon');

    //Header image
    function unhook_thematic_functions() {
    remove_action('thematic_header','thematic_brandingopen',1);
    }
    add_action('init','unhook_thematic_functions');
    function childtheme_logo() { ?>
    <div id="branding">
    <img id="logo" src="/images/galva.jpg" border="0" alt="" />
    <!--Logo-->
    <img id="Premaman - sukurta būsimai mamai, kūdikiui ir vaikui" src="/files/2009/10/premaman.jpg" style="z-index:10" border="0" alt="Premaman" />
    <?php }
    add_action('thematic_header','childtheme_logo',1);
    // Adds a search box to your theme header
    function childtheme_mysearch() { ?> <div id="mysearch">
    <?php get_search_form(); ?>
    </div><?php }
    add_action('thematic_header', 'childtheme_mysearch',2);
    add_filter('search_field_value', 'my_search_field_value');
    function my_search_field_value($value) {
    return 'Ieškokite...';
    }

    /* Get Rid of Default 404 page */
    function remove_thematic_404_content() {
    remove_action('thematic_404','thematic_404_content');
    }
    add_action('init','remove_thematic_404_content');

    /* New 404 page content */
    function my_404_content() { ?>
    <div class="entry-content">
    <?php _e('<h2>Deja, toks įrašas neegzistuoja</h2>
    <p>Jei Jūs patekote čia, galbūt Jus atvedė klaidinga nuoroda iš kitų šaltinių, arba nėra įrašų, atitinkančių Jūsų paieškos kriterijus. Jei žinote įrašo pavadinimą, temą arba datą, galite apsidairyti mūsų straipsnių (pagal paskelbimo datą) arba temų archyvuose.
    Taip pat būtume dėkingi, jei skirtumėte truputį savo laiko ir praneštume apie klaidingą nuorodą elektroniniu paštu blog@premaman.lt.
    Taip pat galite pamėginti ieškoti pagal kitokius paieškos žodžius.</p>', 'thematic')
    ?>

    </div>
    <form id="error404-searchform" method="get" action="<?php bloginfo('home', TRUE) ?>">
    <div>
    <input id="error404-s" name="s" type="text" value="<?php echo wp_specialchars(stripslashes($_GET['s']), true) ?>" size="40" />
    <input id="error404-searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Ieškoti', 'thematic') ?>" />
    </div>
    </form>
    <?php }
    /* end thematic_404_content */
    add_action('thematic_404','my_404_content');
    //Read more
    function my_more_text($content) {
    $content = 'Skaitykite toliau >>';
    return $content;
    }
    ?>

    Posted 11 years ago #
  2. Problem solved. I can't just remove <div id="category-access">. Should use #category-access {display:none;} instead.

    Posted 11 years ago #
  3. Problem still not resolved. It appears when i put my functions.php to encoding UTF-8. If i leave 8-bit encoding - it didn't display local characters the right way.

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.