• Resolved omidgs

    (@omidgs)


    Hello

    I created a theme , when i am logining im admin page this error dispaled
    Warning: Cannot modify header information – headers already sent by (output started at /home/celatini/public_html/wp-content/themes/New Folder (2)/functions.php:1) in /home/celatini/public_html/wp-includes/pluggable.php on line 897

    and more similar errors

    i only use this codes in function.php

    <?php add_theme_support(‘post-thumbnails’); ?>
    <?php
    function new_excerpt_length($length) {
    return 55;
    }
    add_filter(‘excerpt_length’, ‘new_excerpt_length’);
    ?>

    <?php function new_excerpt_more($more) {
    global $post;
    return ‘ID) . ‘”>[?????]‘;
    }
    add_filter(‘excerpt_more’, ‘new_excerpt_more’);

    ?>

    plaese help me to solve problem

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter omidgs

    (@omidgs)

    Hey guys what i should do?

    You need to remove the space between PHP tags. The best thing is to not close the php tags at all.

    Below is how your functions.php should look like:

    <?php
    // php tag start here and it does not close
    
    add_theme_support('post-thumbnails');
    
    function new_excerpt_length($length) {
    return 55;
    }
    add_filter('excerpt_length', 'new_excerpt_length');
    
    function new_excerpt_more($more) {
    global $post;
    return 'ID) . '">[?????]';
    }
    add_filter('excerpt_more', 'new_excerpt_more');
    // no closing php tag
    Thread Starter omidgs

    (@omidgs)

    very nice thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘function.php errors !!!’ is closed to new replies.