Thanks alchymyth. I tried it without the TEMPLATEPATH, without the leading backslash, and a variety of other combination I saw suggested on this forum, but none of them worked 🙁
I might end up waving the white flag on this one as I am completely stumped.
a few questions:
– any error messages?
– what is showing on the front page when you are using the alternative comments template:
— the normal comments with the input form?
— no comments?
– do the comments show if you are using the normal comments template on the front page (with the $withcomments code)?
– does the call of the alternative comments form work if you use it in single.php?
– there is the possibility of plugins interfering – have you tried to deactivate all plugins to see if it is working?
Thanks alchymyth for the additional questions. I had tried all the above and when I realized it wasn’t working on the single.php either, I was further convinced it had something to do with the TEMPLATEPATH on this host. I ended up running an “echo TEMPLATEPATH” to see if there was something I was missing and it had to do with the / before the comments-noreply.php
Such a big headache for such a small fix, but it’s working now. Thanks for your help.
(@lightfoot33)
12 years, 11 months ago
I currently am working on a site that I already created a comments.php file for that I want to appear on all the single.php pages. It does this without any problems. I can also call to it from the home/index page using the following line of code:
<?php global $withcomments; $withcomments = 1; comments_template( ”, true ); ?>
My questions is this: On the home page, I don’t want the reply box to show. I only want the comments (if there are any) to show up. To accomplish this, I created and additional file called comments-noreply.php (similar to comments.php) but I can’t figure out how to call to it from the home page. I tried the following code, but it didn’t work:
<?php global $withcomments; $withcomments = 1; comments_template( TEMPLATEPATH . ‘/comments-noreply.php’, true ); ?>
I think I am close, but obviously I am still missing something.
Can anyone please advise how to call to an alternate comments template from the index file?