Thread Starter
error
(@error)
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?
Thread Starter
error
(@error)
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
- copy
page.php
(in your current theme’s directory) to page.old.php
- copy
single.php
to page.php
(now you see why we made a backup)
- Tada. If you want the sidebar back, you’ll have to find the
class="widecolumn"
and replace it with class="narrowcolumn"
and then put: <?php get_sidebar(); ?>
right above <?php get_footer(); ?>
If SOME
- Do the same thing, but instead of overwriting
page.php
copy single.php
to a new file: pagecomm.php
- Edit
pagecomm.php
to include the appropriate Template Name hook (you might read the whole article while you’re there)
- Edit the Page in question and tell it to use the new Template you’ve just created by selecting the new Template from the “Page Template” dropdown (below the main textbox).
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(); ?>
Thanks this helped me out too!
@mdawaffe: THANKS THANKS THANKS for the hint!!!!