|
Wordpress "Page" Comments?
12-26-2007, 06:14 PM
|
Wordpress "Page" Comments?
|
Posts: 2,389
Name: <member type="brilliant" alt="foolish">James Lewitzke</member>
Location: / public_html / Universe / Virgo_Supercluster / Local_Group / Milky_Way / Orion_Arm / Solar_System / Earth / North_America / USA / Wisconsin
|
OK, I know that comments on pages are allowed, but for some reason they aren't showing up for my blog (lightning shock, in sig). On my other site (Toptenlisted) page comments work just fine.
I made sure that comments were enabled in options, each individual page, etc. and it still doesn't show up.
I'm thinking this might be a theme issue, as my old site's page comments work just fine, but I'm not completely sure. So does anyone know why they aren't being allowed for my blog "pages"? I'm trying to get them enabled for my "Feedback" Page.
|
|
|
|
12-26-2007, 11:19 PM
|
Re: Wordpress "Page" Comments?
|
Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
|
You mean the comment form itself doesn't show up? Or is that just my browser?
Are these the pages you're asking about?
http://www.lightningshock.com/feedback/
http://www.lightningshock.com/disclaimer/
http://www.lightningshock.com/privacy-statement/
http://www.lightningshock.com/about/
My guess would be a theme issue, since the comments still work on your blog. My theme only uses three files ... I'd guess you want something like page.php; if you get the two files, one from each theme, you can do a compare ... there'll be changes, but since it calls out to the sidebar, header, and footer, there might be few enough of them for you to isolate the line of php that makes the form show up.
|
|
|
|
12-26-2007, 11:31 PM
|
Re: Wordpress "Page" Comments?
|
Posts: 2,389
Name: <member type="brilliant" alt="foolish">James Lewitzke</member>
Location: / public_html / Universe / Virgo_Supercluster / Local_Group / Milky_Way / Orion_Arm / Solar_System / Earth / North_America / USA / Wisconsin
|
Quote:
Originally Posted by ForrestCroce
You mean the comment form itself doesn't show up? Or is that just my browser?
Are these the pages you're asking about?
|
Yeah, (I meant "pages", as opposed to "posts")
Quote:
Originally Posted by ForrestCroce
My guess would be a theme issue, since the comments still work on your blog. My theme only uses three files ... I'd guess you want something like page.php; if you get the two files, one from each theme, you can do a compare ... there'll be changes, but since it calls out to the sidebar, header, and footer, there might be few enough of them for you to isolate the line of php that makes the form show up.
|
OK this is my original lightningshock page.php code:
Code:
<?php
get_header();
$alwayssidebars = get_option('royale_always_show_sidebars');
if ($alwayssidebars) {
if (get_option('royale_sidebar1_left')) include (TEMPLATEPATH . '/sidebar.php');
if (get_option('royale_3columns') && get_option('royale_sidebar2_left')) {
include (TEMPLATEPATH . '/sidebar2.php');
}
}
?>
<td id="content" class="<?php echo ($alwayssidebars ? 'narrow' : 'wide'); ?>column">
<?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','royale') .' »</p>'); ?>
<?php link_pages('<p><strong>'. __('Pages','royale') .':</strong> ', '</p>', 'number'); ?>
</div>
<div style="clear: both;"></div>
</div>
<?php endwhile; endif; ?>
<?php edit_post_link(__('Edit this page','royale'), '<p>', '</p>'); ?>
</td>
<?php
if ($alwayssidebars) {
if (!get_option('royale_sidebar1_left')) include (TEMPLATEPATH . '/sidebar.php');
if (get_option('royale_3columns') && !get_option('royale_sidebar2_left')) {
include (TEMPLATEPATH . '/sidebar2.php');
}
}
get_footer();
?>
I did catch this line of code in my toptenlisted page.php:
Code:
<?php comments_template(); ?>
Which I think might be what I need, but I'd have no idea where to place it in my lightningshock page.php file, as they didn't look very similar to each other
|
|
|
|
12-26-2007, 11:36 PM
|
Re: Wordpress "Page" Comments?
|
Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
|
Somebody else will have to comment on the php code ... I'm in over my head. I noticed this part at the bottom looks funny - like it might be set to only display comments in a sidebar that could be turned off?
if (get_option('royale_3columns') && !get_option('royale_sidebar2_left')) {
include (TEMPLATEPATH . '/sidebar2.php');
}
I was asking about pages because, I'm not really sure what to call these, but if you click one of the photos on my site, it'll take you to another page with that one photo, a bit of text about it in particular, and a comment form. WP seems to have a few different types of pages...
|
|
|
|
12-26-2007, 11:44 PM
|
Re: Wordpress "Page" Comments?
|
Posts: 2,389
Name: <member type="brilliant" alt="foolish">James Lewitzke</member>
Location: / public_html / Universe / Virgo_Supercluster / Local_Group / Milky_Way / Orion_Arm / Solar_System / Earth / North_America / USA / Wisconsin
|
Quote:
Originally Posted by ForrestCroce
Somebody else will have to comment on the php code ... I'm in over my head. I noticed this part at the bottom looks funny - like it might be set to only display comments in a sidebar that could be turned off?
if (get_option('royale_3columns') && !get_option('royale_sidebar2_left')) {
include (TEMPLATEPATH . '/sidebar2.php');
}
|
I'm surely no coding expert, but I think that line *might* be because my theme is very customizable, I can change it between one sidebar column or two sidebar columns, and have both on the left, or right, or one on each side (like I have now)
Quote:
Originally Posted by ForrestCroce
I was asking about pages because, I'm not really sure what to call these, but if you click one of the photos on my site, it'll take you to another page with that one photo, a bit of text about it in particular, and a comment form. WP seems to have a few different types of pages...
|
I'm not exactly sure if that's a page you're referring to, it looks more like a "post entry" to me. When I created my pages I used the "write" > "write page" section to create them.
|
|
|
|
12-27-2007, 12:11 AM
|
Re: Wordpress "Page" Comments?
|
Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
Forrest is right. It is your template.
There's a file in your template called "page.php". Add this line just after the section containing your post:
Code:
<?php comments_template(); ?>
I'd put it either just before or just after this entry:
Code:
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
|
|
|
|
12-27-2007, 12:16 AM
|
Re: Wordpress "Page" Comments?
|
Posts: 2,389
Name: <member type="brilliant" alt="foolish">James Lewitzke</member>
Location: / public_html / Universe / Virgo_Supercluster / Local_Group / Milky_Way / Orion_Arm / Solar_System / Earth / North_America / USA / Wisconsin
|
Thanks Adam, it's working now. Just what I was thinking it might be 
|
|
|
|
|
« Reply to Wordpress "Page" Comments?
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|