you should look at conditionals with wordpress. Such as is_single(), is_page()
if you are looking to allows comments on one page but not another, I would make an if statement for the post id
if($post->ID!=45)
{
//do stuff like show comment form
}
how do i do the stuff, from where do i go?
thanks
are you specifically working with pages, or posts and pages.
if pages, there is a file in your template folder called page.php.
search that file for “comments” and you will probably find something like comments_template();
that displays your comments form.
if($post->ID!=45)
{
comments_template();
}
if you want to blog from posts, you will edit single.php
of course, every theme is different, so the theme author might have just added the full comment code to your page.php file instead of using the comments_template();
I have several pages and i don’t need comment box on all.
Some should be just the text and side nav, thats all.
appreciate you.
thank you
I have several pages and i don’t need comment box on all.
Some should be just the text and side nav, thats all.
appreciate you.
thank you
i tried but i couldn’t get it done. i saw comments_template(); but when i added what you told me it gave an error, though i know i must have missed something. what i di was
after comments_template();
<?php comments_template();
//since am working on pages i did
if(page_id=19)
{
// i realy dont know what to put here
no display;
}
?>
if you want to remove from all pages, just comment out comments_template() function in the page.php file.
//comments_template();
thanks and am sorry to be a pest, but i dont want to remove it in all the pages but some of the pages.
thanks buddy.
I got a place around and i think it solved my problem.
on the pages in the admin area, just mouseover a page name, it will bring up different options for you, click on quick edit, you find the option of allowing comments or not, but on the site depending on theme used, it will just say comments closed.
Though i don’t want comment closed but i guess i’d just make do with this for now pending when i get a better solution.
Thanks buddy