• Resolved wrightj999

    (@wrightj999)


    I just downloaded WordPress and got everything running pretty well last night. after getting everything set up in the default Kubrick theme, I decided I wanted to change themes. So I downloaded this new Titan theme and everything seemed to work great. I noticed after this happened that there was a message at the top of my blogs screen that said that “comments have been disabled”. So I changed the settings so that anyone could leave a comment. My next move was to add a plug in for google analytics, then I hooked up my analytics I.D..

    So the next morning, today, I find that I can’t log into my wp-admin to make changes. Instead I get the following error message:

    Comments are closed for this entry.

    ‘Warning: Cannot modify header information – headers already sent by (output started at /home/wrightmu/public_html/prosnowboardcoach/wp-content/themes/Titan theme/functions/comments.php:14) in /home/wrightmu/public_html/prosnowboardcoach/wp-includes/pluggable.php on line 850’

    I also noticed something else that was funny. While I can still go to my sites URL, where it still says that comments are disabled at the top of the page, when I go to leave a comment on my own page, it tells me I must log in. So I log in and it takes me to yet another error message page that says the following:

    Comments are closed for this entry.

    Warning: Cannot modify header information – headers already sent by (output started at /home/wrightmu/public_html/prosnowboardcoach/wp-content/themes/Titan theme/functions/comments.php:14) in /home/wrightmu/public_html/prosnowboardcoach/wp-login.php on line 255

    Warning: Cannot modify header information – headers already sent by (output started at /home/wrightmu/public_html/prosnowboardcoach/wp-content/themes/Titan theme/functions/comments.php:14) in /home/wrightmu/public_html/prosnowboardcoach/wp-login.php on line 267

    Warning: Cannot modify header information – headers already sent by (output started at /home/wrightmu/public_html/prosnowboardcoach/wp-content/themes/Titan theme/functions/comments.php:14) in /home/wrightmu/public_html/prosnowboardcoach/wp-includes/pluggable.php on line 649

    Warning: Cannot modify header information – headers already sent by (output started at /home/wrightmu/public_html/prosnowboardcoach/wp-content/themes/Titan theme/functions/comments.php:14) in /home/wrightmu/public_html/prosnowboardcoach/wp-includes/pluggable.php on line 650

    Warning: Cannot modify header information – headers already sent by (output started at /home/wrightmu/public_html/prosnowboardcoach/wp-content/themes/Titan theme/functions/comments.php:14) in /home/wrightmu/public_html/prosnowboardcoach/wp-includes/pluggable.php on line 651

    Warning: Cannot modify header information – headers already sent by (output started at /home/wrightmu/public_html/prosnowboardcoach/wp-content/themes/Titan theme/functions/comments.php:14) in /home/wrightmu/public_html/prosnowboardcoach/wp-includes/pluggable.php on line 850′

    Could someone please help me with this? I would just change back to the Kubrick theme if this new theme I downloaded is what is causing the problem, but I just can’t get into the admin.

    It’s too bad, I kinda really liked the theme too.

Viewing 15 replies - 1 through 15 (of 18 total)
  • Hi

    Go back into /wp-content/themes/Titan theme/functions/comments.php and check for any spaces, line returns, or characters either before the opening <?php tag or after the closing ?> tag. There can not be even a single space there. That is the cause of the error messages.

    You edited the file last night, apparently, and unintentionally added some text (even spaces) outside of the PHP code. More than likely your theme will be just fine.

    Thread Starter wrightj999

    (@wrightj999)

    I have actually already checked that and did not find any of the above mentioned things. I will add the code from the php file below so you can see what is in it. Once again, I guarantee there were no spaces or characters before the first “<?php” and the last “?>”:

    <?php
    // Do not delete these lines
    if (!empty($_SERVER[‘SCRIPT_FILENAME’]) && ‘comments.php’ == basename($_SERVER[‘SCRIPT_FILENAME’]))
    die (‘Please do not load this page directly. Thanks!’);

    if ( post_password_required() ) { ?>
    <p class=”nocomments”>This post is password protected. Enter the password to view comments.</p>
    <?php
    return;
    }
    ?>
    <!– You can start editing here. –>
    <div id=”comments”>
    <?php if ( have_comments() ) : ?>
    <div class=”comment-number”>
    <span><?php comments_number(‘No Comments Yet’, ‘1 Comment’, ‘% Comments’ );?></span>
    “> →
    </div><!–end comment-number–>
    <ol class=”commentlist”>
    <?php wp_list_comments(‘type=comment&callback=custom_comment’); ?>

    <div class=”navigation”>
    <div class=”alignleft”><?php previous_comments_link() ?></div>
    <div class=”alignright”><?php next_comments_link() ?></div>
    </div>
    <?php if ( ! empty($comments_by_type[‘pings’]) ) : ?>
    <h3 class=”pinghead”>Trackbacks & Pingbacks</h3>
    <ol class=”pinglist”>
    <?php wp_list_comments(‘type=pings&callback=list_pings’); ?>

    <?php endif; ?>
    <?php else : // this is displayed if there are no comments so far ?>

    <?php if (‘open’ == $post->comment_status) : ?>
    <!– If comments are open, but there are no comments. –>
    <?php else : // comments are closed ?>
    <!– If comments are closed. –>
    <p class=”note”>Comments are closed for this entry.</p>
    <?php endif; ?>
    <?php endif; ?>
    </div><!–end comments–>

    <?php if (‘open’ == $post->comment_status) : ?>

    <div id=”respond”>
    <div class=”cancel-comment-reply”>
    <small><?php cancel_comment_reply_link(); ?></small>
    </div>
    <h4 id=”postcomment”><?php comment_form_title( ‘Leave a Reply’, ‘Leave a Reply to %s’ ); ?></h4>
    <?php if ( get_option(‘comment_registration’) && !$user_ID ) : ?>
    <p>You must be /wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>”>logged in to post a comment.</p>
    </div><!–end respond–>
    <?php else : ?>
    <form action=”<?php echo get_option(‘siteurl’); ?>/wp-comments-post.php” method=”post” id=”commentform”>
    <?php if ( $user_ID ) : ?>
    <p>Logged in as /wp-admin/profile.php”><?php echo $user_identity; ?>. ” title=”Log out of this account”>Log out »</p>
    <?php else : ?>
    <fieldset>
    <label for=”author” class=”comment-field”><small>Name <?php if ($req) _e(‘(required)’); ?>:</small></label>
    <input class=”text-input” type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” tabindex=”1″ />
    </fieldset>
    <fieldset>
    <label for=”email” class=”comment-field”><small>Email <?php if ($req) _e(‘(required)’); ?>:</small></label>
    <input class=”text-input” type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” tabindex=”2″ />
    </fieldset>
    <fieldset>
    <label for=”url” class=”comment-field”><small>Website:</small></label>
    <input class=”text-input” type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” tabindex=”3″ />
    </fieldset>
    <?php endif; ?>
    <fieldset>
    <label for=”comment” class=”comment-field”><small>Comment:</small></label>
    <textarea name=”comment” id=”comment” cols=”50″ rows=”10″ tabindex=”4″></textarea>
    </fieldset>
    <p class=”guidelines”>Note: XHTML is allowed. Your email address will never be published.</p>
    <p class=”comments-rss”><?php comments_rss_link(__(‘Subscribe to this comment feed via RSS’)); ?></p>
    <?php do_action(‘comment_form’, $post->ID); ?>
    <fieldset>
    <input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit Comment” />
    <input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />
    </fieldset>
    <?php comment_id_fields(); ?>
    </form><!–end commentform–>
    </div><!–end respond–>

    <?php endif; // If registration required and not logged in ?>

    <?php endif; // if you delete this the sky will fall on your head ?>

    Thread Starter wrightj999

    (@wrightj999)

    I’ll be right back got to run out for lunch, then I will be back to tackle this problem. Thanks.

    The file you pasted above is not the comments.php located in /functions…

    This is the file in your theme directory.

    The error talks about the file in /functions/

    You will find it there /functions/comments.php

    —-

    If you want to disable this theme, even if you can’t log in the admin panel, just log via FTP and delete the “titan” directory… WP should revert to the default theme.

    S.

    Is it the theme you’re trying to use ?

    https://www.ads-software.com/extend/themes/titan

    S.

    Thread Starter wrightj999

    (@wrightj999)

    That’s odd that is not the code to the file you specified, as that is what I get when I navigate to that .php file. I’ll even show you the exact directory route to it:

    /public_html/prosnowboardcoach/wp-content/themes/Titan theme/functions/comments.php

    Of course I double-checked, but the above code is exactly what I get when I go to edit code through my hostmonster server.

    Perhaps I should do as you suggested and just delete the Titan theme, and hopefully that will give me access back to my admin panel.

    Thread Starter wrightj999

    (@wrightj999)

    and also, the line 14 specified in the error simply contains:

    <?php if ( have_comments() ) : ?>

    I just tested this theme and it works well.

    But, you don’t have the good comments.php in Titan theme/functions.

    Look in the theme directory from the file you downloaded on your computer. You have two comments.php.

    1- One in titan/ (the one you pasted above)

    2- An other in titan/functions/

    Those are differents files… I suggest you to replace the one in /functions from a fresh download oh the theme…

    S.

    Thread Starter wrightj999

    (@wrightj999)

    Thank you so much Simon, you are the man. Pretty simple fix, I’m glad I’m in the know about this method now.

    I like your bang bang site, the template is really nice, and the content is cool I wish I could read french!

    Thread Starter wrightj999

    (@wrightj999)

    I have one more question for you. Where do you find the footer.php in the theme directory. I want to ad my google adsense code to my blog. I originally added it using a plug in, because I didn’t realize you could just open up the .php and do it just like an .html file.

    So I wanna dump that unnescessary plug in and do it the normal way, just adding the code before the </body> tag.

    Thread Starter wrightj999

    (@wrightj999)

    I think I’ve already answered my own question. you find it in themes. So I assume you have to add the code to the footer.php of whatever theme that your using.

    Thanks for the good words about BangBang. I’m not done yet with this new layout for the site, but I’m glad you like it.

    Yes, the footer.php is (always) in the theme root folder. You can edit this file (like any other template file) with a decent text editor to paste your analytics code, or any code you like to add…

    I suggest notepad ++

    https://notepad-plus.sourceforge.net/fr/site.htm

    S.

    Thread Starter wrightj999

    (@wrightj999)

    Thanks Again!

    Thread Starter wrightj999

    (@wrightj999)

    Okay, one more question!

    I was trying to add some meta tags (keywords, description) and it doesn’t seem to be working right. I added them right after the initial head tag, but they seem to be showing up on the top of my blog as text that pushes the site down the page a tad bit.

    There must be something I’m doing wrong here. I just don’t know what it is, it seems like a simple task anyways, it always has been with html.

    Thread Starter wrightj999

    (@wrightj999)

    Also, I was noticing that my template is a little sparse on page navigation buttons. Are those easy to add as they become nescessary? If so, where do I make the changes?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Can’t Log into Admin’ is closed to new replies.