Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #739850

    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.

    FAQ

    #741604

    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

    #741617

    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

    #741647

    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

    #741663

    Hi Ismael.

    Added script and no errors now but also no comments.

    Could not find another “ava_custom_script”

    #742638

    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

    #742663

    FTP below. Thanks.

    #743097

    Hey!

    Thank you for the update. Please remove browser cache before checking the page. And note that the comments tab will display once the page finished loading.

    Regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.