I've created several static pages in 1.3-alpha4 (2004-11-11) and while a Comments (0) link appears at the bottom, there doesn't seem to be any way for a user to leave a comment. How can I enable comments for static pages?
I've created several static pages in 1.3-alpha4 (2004-11-11) and while a Comments (0) link appears at the bottom, there doesn't seem to be any way for a user to leave a comment. How can I enable comments for static pages?
Hm, as it turns out, this isn't actually implemented! So I went and implemented it. Here are the changes required:
In wp-includes/template-functions-comment.php
Change line 28 to read:
if ( is_single() || is_page() || $withcomments ) :
Change line 103 to read:
if (! is_single() && ! is_page()) {
Now I can post comments to my static pages, but after I hit "Say it!" I get redirected back to the main page, rather than to the static page I was looking at. Any ideas?
Leave it to me to eventually figure it out myself. The reason it went back to the main page was an omission in wp-includes/template-functions-links.php
Change line 53 to read:
return get_page_link($id);
Voila! I can now comment on static pages, and everything works! Feel free to do whatever you wish with this hack.
I don't get it.
I want to be able to have comments on my static pages, too.
How did you do this?
I can't even get the Comments(0) to show up.
Do tell... do telll .
NOTE: The above is out of date. Editing the core is not required.
The following assumes you are using the default Kubrick theme for 1.5.
Do you want this to happen to ALL pages, or just some?
If ALL
page.php (in your current theme's directory) to page.old.phpsingle.php to page.php (now you see why we made a backup)class="widecolumn" and replace it with class="narrowcolumn" and then put: <?php get_sidebar(); ?>
right above <?php get_footer(); ?>If SOME
page.php copy single.php to a new file: pagecomm.phppagecomm.php to include the appropriate Template Name hook (you might read the whole article while you're there)Want it for some / or all ... not sure.
I shall give `er a spin.
Thank you sooooo much for the reply, and I will report tonight how it went.
I love wordpress support forums...
Okay,
Father Luke
Works great, on all fronts.
Thanks again.
Hello, was just wondering about this.. what if Kubrick is not the theme in use? is there a way around that?
Just add comments_template() to your page template wherever you want the comment form to appear.
<?php comments_template(); ?>
thank you :-)
Thanks this helped me out too!
@mdawaffe: THANKS THANKS THANKS for the hint!!!!
This topic has been closed to new replies.