Add Comments to Single download page
-
Hi there. All you need to do is add the following snippet of code in either your active theme functions.php file or in a custom plugin (try Pluginception):
function custom_edd_add_comments_support( $supports ) { $supports[] = 'comments'; return $supports; } add_filter( 'edd_download_supports', 'custom_edd_add_comments_support' );
Thanks for reply but when i paste code in functions.php, i got a fatal error !
Fatal error: Cannot redeclare custom_edd_add_comments_support() (previously declared in /homepages/15/d258506877/htdocs/keyboard-scores/wp-content/plugins/comments-products/comments-products.php:12) in /homepages/15/d258506877/htdocs/keyboard-scores/wp-content/themes/shop-front/functions.php on line 5
That error is saying that the function name
custom_edd_add_comments_support()
is being used twice, which is not allowed in PHP.It appears that you’ve added the code to a plugin as well as to your theme? In my reply before, I suggested that you do one or the other, not both. I would personally remove it from the theme.
If your site is down, log into your server through FTP and navigate to “keyboard-scores/wp-content/themes/shop-front/functions.php”. Open the file and remove the block of code.
Doing it from just the plugin is the best solution.
I use Shop Front Theme.
I paste code into the theme-functions.php but “Leave a Reply” remain to be invisible on the single product page.I’m sorry, I don’t really know what you mean. Is there still a fatal error on your site or has that part been resolved? If it has been resolved, are comments showing up on your single download pages?
Yes I resolve the fatal error ! i download old file on website via ftp !
Now “allow comment” option works but i need to turn on this option on all the old downloads. only new downloads have “the comments” on after the code update.
BestAll works fine !
Glad to hear it!
- The topic ‘Add Comments to Single download page’ is closed to new replies.
(@stefpiano)
8 years, 10 months ago
How can i active comments on single download page of each product ?
Best
https://wordpress.org/plugins/easy-digital-downloads/