admin管理员组文章数量:1333412
I am wanting my users to be able to post comments on my portfolio page.
Ive created a portfolio page using custom posts.
On my blog i am using the comments_template(); and then on the comments.php i have the code.
On the blog side it works 100%
But when I add the comments_template(); on the portfolio single page it does nothing.
I get no errors or anything.
How do people implement comments within the portfolio pages?
Can you not use the same comment.php file for all comments, b
Thanks
I am wanting my users to be able to post comments on my portfolio page.
Ive created a portfolio page using custom posts.
On my blog i am using the comments_template(); and then on the comments.php i have the code.
On the blog side it works 100%
But when I add the comments_template(); on the portfolio single page it does nothing.
I get no errors or anything.
How do people implement comments within the portfolio pages?
Can you not use the same comment.php file for all comments, b
Thanks
Share Improve this question asked Dec 2, 2013 at 13:34 RobertRobert 1993 silver badges12 bronze badges 1- this may help you ryanflorence/… – Ravinder Kumar Commented Dec 2, 2013 at 17:47
1 Answer
Reset to default 1When registering a custom post type you need to enable comments. In the arguments defining the CPT, you need to include something like this:
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
The example on the Codex is shows where this option needs to go, this page also shows a list of other options you may or may not want to include: http://codex.wordpress/Function_Reference/register_post_type#Example
本文标签: commentsusing commentstemplate() in custom singleportfoliophp
版权声明:本文标题:comments - using comments_template() in custom single-portfolio.php 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742329684a2454437.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论