How to display the comments box in pages built by the page builder
By default comments section is disabled on the pages built via the Page builder, to enable it, Add this code to your child theme’s functions.php
file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly to your parent theme’s functions.php
file, as this will be wiped entirely when you update the theme.
add_action( 'TieLabs/after_builder_content', 'jannah_custom_comments_pagebuilder' ); function jannah_custom_comments_pagebuilder(){ global $wp_styles; if( ! empty( $wp_styles->registered['tie-css-single']->src ) ){ echo '<link rel="stylesheet" id="tie-css-single" href="'. $wp_styles->registered['tie-css-single']->src .'" type="text/css" media="all" />'; } echo '<div class="post-components container">'; echo '<div class="tie-row">'; echo '<div class="main-content tie-col-md-12">'; echo tie_post_comments(); echo '</div>'; echo '</div>'; echo '</div>'; }