Enabling comments in portfolio items
This support request was posted in Netelier by scottepond
- scottepondJuanfra Aldasoro February 10, 2014 at 2:03 pm
Hello there,
Thanks for writing. Yes, there’s a simple way. You’ll need to call the comments function in your single-portfolio.php file:
comments_template( '', true );
You can check the file single.php in order to check where and how to include it 🙂
Best,
Juan.scottepond February 10, 2014 at 6:36 pmThanks Juan. I’ll give that a try as soon as my flight lands. Cheers!
scottepond February 13, 2014 at 5:45 amJuan: I tried updating the single-portfolio.php file like it indicates on the single.php file… all that happens is a line is drawn at the top of the portfolio. I tried it in a few locations in the file but it doesn’t seem to activate comments. Any recommendations?
scottepond February 13, 2014 at 5:56 amUpdate: I was able to get it in the code to show up where I want it, but it only appears as a line, not as a the actual comments. Is there something else that I need to do to ensure it is expanded?
scottepond February 13, 2014 at 6:00 amYou can see the line below the image in the following link: http://scottpond.com/scotteponddesigns/portfolio/slingers-book-1/
Juanfra Aldasoro February 13, 2014 at 1:46 pmHello There,
Thanks for writing.
I forgot to mention that you’ll have to edit the way the portfolio custom post type is registered.
Open the following file /includes/custom-post-types/portfolio.php and where it says:
'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes', 'excerpt' )
Add comments.
'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes', 'excerpt', 'comments' )
Once you have done that, remember to check the discussion feature while editing/creating the portfolio item. This would be: When creating/editing a page, have a look on the top right part of the screen. You’ll see a button that says “Screen Options”. Click that.
A panel with the screen options will be toggled. There you can check the “Discussion” checkbxox.
In the form you’ll see that there’s a new box, named “Discussion”. There you can enable/disable comments.
Have a nice day.
Juanscottepond February 14, 2014 at 2:44 amThanks Juan! That did the trick.
Last question: is there a way to make new portfolios automatically have the “allow comments” under the discussion setting be defaulted to “checked”?
Juanfra Aldasoro February 14, 2014 at 2:22 pmHi Scott,
Thanks for the follow up.
I’m afraid that has to do with WordPress. As far as I’m concerned that’s a bit random. I’m sorry I can’t help you on this one
Best,
Juan.scottepond February 14, 2014 at 4:22 pmNo worries, thanks for the great help Juan! This one can be closed out.
This topic is marked as resolved
Only the topic author can re-open this thread.