Accidentally deleted some php comments code

  • Author
    Posts
  • #34068
    Jon

    Hi

    I hope somebody can help me. I was looking in the editor page and the comments section and I accidentally deleted some code and saved it. Now my pages are all black when they were white and their is this message along the bottom of the pages.

    Parse error: syntax error, unexpected ‘<‘ in /home/content/p3pnexwpnas08_data03/73/2579073/html/wp-content/themes/tempera/comments.php on line 51..

    I don’t know how to sort this out. Is there a file with the full comments page code I could view so that I could retype it?
    I’m stressing out.

    This is the comments code page i am talking about..

    Please help me, i don’t know what iv’e done.

    Thanks

    <?php
    /**
     * The template for displaying Comments.
     *
     * The area of the page that contains both current comments
     * and the comment form.  The actual display of comments is
     * handled by a callback to tempera_comment which is
     * located in the includes/theme-comments.php file.
     *
     * @package Cryout Creations
     * @subpackage tempera
     * @since tempera 0.5
     */
    
    $temperas = tempera_get_theme_options();
    foreach ($temperas as $key => $value) { ${"$key"} = $value; }
    $tempera_comclass='';
    if ( (!comments_open()) && (get_comments_number()<1) && 
    (($tempera_comclosed=="Hide everywhere") || (is_page() && $tempera_comclosed=="Hide in pages") || (is_single() && $tempera_comclosed=="Hide in posts") )) : $tempera_comclass="hideme"; endif;
    ?> <div id="comments" class="<?php echo $tempera_comclass ?>"> <?php
    if (get_comments_number()<1):
    
    else:
    	if ( post_password_required() ) : ?>
    		<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'tempera' ); ?></p>
    		</div><!-- #comments --> <?php
    		/* Stop the rest of comments.php from being processed,
    		 * but don't kill the script entirely -- we still have
    		 * to fully load the template.
    		 */
    		return;
    	
    
    	// You can start editing here -- including this comment!
    
    	if ( have_comments() ) : cryout_before_comments_hook(); ?>
    	<ol>
    		<?php cryout_comments_hook(); ?>
    	</ol>
    	<?php cryout_after_comments_hook(); 
    	else : // or, if we don't have comments:
    		cryout_nocomments_hook();
    	endif; // end have_comments() ?>
    
    <?php
    endif; 
    ?><p class="nocomments<?php if (is_page()) echo "2"; ?>"><?php _e("Comments are closed","tempera");?></p>
    <?php
    <?php if ( comments_open() ): comment_form(); 
    	  else : ?> 
    	  endif; ?>
    </div><!-- #comments -->
    #34069
    Jon

    I found the Tempera zip in my downloads and i extracted the contents page and looked at the code difference.I changed what i could see was wrong but its still not working. The background is black and i cant see my sidebar widgets.

    #34083
    Zed
    Cryout Creations mastermind

    You have two php opening tags on lines 50 and 51:

    <?php
    <?php

    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Accidentally deleted some php comments code’ is closed to new replies.