Tagged: comment section
Hey ezvisa,
To copy the comment.php to child theme and change it, please add this code to the end of your child theme functions.php file in Appearance > Editor:
function avia_include_shortcode_template($paths)
{
$template_url = get_stylesheet_directory();
array_unshift($paths, $template_url.'/shortcodes/');
return $paths;
}
add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
then create a folder “shortcodes” in your child theme directory and add your modified file there.
Another option is to add this code to the end of your functions.php file in Appearance > Editor to change the text, but you must have jQuery enabled and loading in the head within the performance settings:
function custom_comment_script(){
?>
<script>
jQuery(window).load(function(){
// Replace coments title to "Let me know your thoughts, leave a comment.".
jQuery(".single-post .miniheading").text("Let me know your thoughts, leave a comment.");
// Replace sub-heading to "Please tell us more".
jQuery(".single-post .minitext").text("Please tell us more");
// Replace submit button text to "Post your Thoughts".
jQuery(".single-post .submit").val("Post your Thoughts");
});
</script>
<?php
}
add_action('wp_footer', 'custom_comment_script');
Best regards,
Mike