1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress Theme Error

Discussion in 'Blogging' started by Vento, Aug 28, 2010.

  1. Vento

    Vento Registered Member

    Joined:
    Nov 23, 2009
    Messages:
    64
    Likes Received:
    27
    Anyone knows how to fix this?


    Code:
    [B]Warning[/B]:  Cannot modify header information - headers already sent  by (output started at  /hermes/web10/b639/moo.lithiummedia/adaptive-media/wp-content/themes/Jenks/functions.php:183)  in [B]/hermes/web10/b639/moo.lithiummedia/adaptive-media/wp-includes/pluggable.php[/B] on line [B]890[/B]
    Just installed a theme, configured it, was working fine, then just came out of nowhere. It shows up on the wp-admin page, and some people are saying it shows up on the actual site aswell :confused:
     
  2. origin

    origin Regular Member

    Joined:
    Nov 11, 2008
    Messages:
    334
    Likes Received:
    90
    Home Page:
    what is the content on themes/Jenks/functions.php between line 180 and line 190?
     
  3. Vento

    Vento Registered Member

    Joined:
    Nov 23, 2009
    Messages:
    64
    Likes Received:
    27
    Thanks for replying origin.

    It's:

    PHP:
        add_action('it_footer', 'print_tracking');
    ?>

    <?php

    add_action
    ('admin_menu''mt_add_pages');

    function 
    mt_add_pages() {
        
    add_links_page(__('WordPress Link','menu-test'), __('WordPress Link','menu-test'), 'manage_options''wplink''mt_links_page');

        
    add_management_page__('Akismet Counter','menu-test'), __('Akismet Counter','menu-test'), 'manage_options''akister''mt_tools_page');
     
  4. origin

    origin Regular Member

    Joined:
    Nov 11, 2008
    Messages:
    334
    Likes Received:
    90
    Home Page:
    And which one is line 183?
    This usually happen when there is an php echo instruction came up before the header. The workaround is by adding:
    <?php ob_start(); ?>
    ...
    <?php ob_flush(); ?> // at the end of the function.
     
  5. Vento

    Vento Registered Member

    Joined:
    Nov 23, 2009
    Messages:
    64
    Likes Received:
    27
    Line 183 is: <?php

    That's it.

    Could I send you the functions.php file through PM? And you can edit it? I'm not that experienced with PHP.

    Thanks :)
     
  6. jeffers1957

    jeffers1957 Registered Member

    Joined:
    Jan 17, 2010
    Messages:
    79
    Likes Received:
    65
    Home Page:
    The first thing i would have tried was to re upload your themes header.php file and just replace the existing one this normally works to put things right and also chmod the functions.php to 777
     
    Last edited: Aug 28, 2010