Hey everybody,
I´m having a big problem with my wordpress Blog http://www.diskaster.de . I´m using the popular elegant-grunge theme, but comments aren´t supported for Pages, only Entries at the main page. So I made a new page.php Template and copied the old one with adding the comments from the single.php
My page.php now looks like this:
<?php get_header(); ?>
<div id="content-container">
<div id="content">
<div id="body">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<div class="entry">
<?php the_content(__('<p class="serif">Read the rest of this page »</p>', 'elegant-grunge')); ?>
<?php wp_link_pages(array('before' => '<p><strong>'.__('Pages:', 'elegant-grunge').'</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
</div>
<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
// Both Comments and Pings are open ?>
<?php printf(__('You can %1$sleave a response%2$s, or %3$strackback%4$s from your own site.', 'elegant-grunge'),
'<a href="#respond">', '</a>', '<a href="'.get_trackback_url().'" rel="trackback">', '</a>') ?>
<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
// Only Pings are Open ?>
<?php printf(__('Responses are currently closed, but you can %1$strackback%2$s from your own site.', 'elegant-grunge'),
'<a href="'.get_trackback_url().'" rel="trackback">', '</a>') ?>
<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
// Comments are open, Pings are not ?>
<?php _e('You can skip to the end and leave a response. Pinging is currently not allowed.', 'elegant-grunge') ?>
<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
// Neither Comments, nor Pings are open ?>
<?php _e('Both comments and pings are currently closed.', 'elegant-grunge') ?>
</div>
</div>
<div class="hr"><hr /></div>
<?php comments_template(); ?>
<?php endwhile; else: ?>
<?php edit_post_link(__('Edit this entry.', 'elegant-grunge'), '<p>', '</p>'); ?>
</div>
<?php if ( get_option('page_setup') != 'no-sidebar' ) get_sidebar(); ?>
</div>
<div class="clear"></div>
</div>
<?php get_footer(); ?>
When I´m using this template I´m getting this error:
Parse error: syntax error, unexpected $end in /is/htdocs/wp1008248_DQDYVOL00R/www/diskaster/wordpress/wp-content/themes/elegant-grunge/page.php on line 51
I have very limited PHP Skills but I´ve got some good programming skills, so I know some basic php things. Could you please tell me whats wrong? Do i have to put the comment code somewhere else? I Appreciate every help!