Hi,
Hope you all are doing well.
I am trying to add the following code in our child theme’s functions.php file to add a comment policy before they comment:
// START Commment Policy
function tips4gamers_comment_text_before($arg) {
$arg['comment_notes_before'] = "<p class='comment-policy'>We're happy you have chosen to leave a comment. However, please keep in mind that comments are moderated according to our <a href='https://example.com/comment-policy/'>comment policy</a>.</p>";
return $arg;
}
add_filter('comment_form_defaults', 'tips4gamers_comment_text_before');
// End Comment Policy
However, it does not populate anything for our Pro theme but it does populate in all of our AMP pages. Is there something I am doing wrong? Here is an example URL - https://www.tips4gamers.com/pro-madden-21-rebuild-tips-for-sim-user-play/.
We have created our own custom layout and are using the “Comment Form” element.
I have cleared all caches as well.
Thanks and regards,
Josh