Hi Guys.
I would like comments to appear as default.
At the moment you have to click on the text ‘comments’ before any comments appear.
How do I do this?
Thanks.
Hi Mark!
Thank you for using Enfold.
Please add this in the functions.php file.
// trigger comment tab
function ava_custom_script() {
?>
<script type="text/javascript">
(function($) {
function a() {
$('.widget_tab_comments').trigger('click');
}
$(window).load(function()) {
a();
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'ava_custom_script');
Cheers!
Ismael
Thanks Ismael but it brought up this error.
Parse error: syntax error, unexpected ‘?’ in /home/thegrea7/public_html/wp-content/themes/enfold/functions.php on line 568
Hey!
Please copy the code directly from this forum, not from your email. And please check if there is an existing “ava_custom_script” function in the functions.php file.
Regards,
Ismael
Hi Ismael.
Added script and no errors now but also no comments.
Could not find another “ava_custom_script”
Hi!
I checked the markup of the page but I can’t see the script there. Are you sure that you added it correctly? Please post the login details here so that we can check the functions.php file.
Best regards,
Ismael
FTP below. Thanks.