In order to enable a comment form on the single event page, please add the following code in the functions.php file:
add_filter(
'event_manager_allowed_comment'
,
'YOUR_THEME_allowed_comment'
, 10 );
function
YOUR_THEME_allowed_comment(
$status
)
{
$status
=
'open'
;
return
$status
;
}
This will be applicable to all the new events that are posted on the website.
To add the comment form to all the previously added events, you need to add the following code to the functions.php file.
function
YOUR_THEME_event_allowed_comment(
$open
,
$post_id
)
{
$post_type
= get_post_type(
$post_id
);
if
(
$post_type
==
'event_listing'
) {
$open
= true;
}
return
$open
;
}-
add_filter(
'comments_open'
,
'YOUR_THEME_event_allowed_comment'
, 10 , 2 );