$postID, 'status' => 'approve' //Change this to the type of comments to be displayed )); if ( $comments ) { ?>

add_query_arg( array('cpage' => '%#%', 'amp' => '1'), get_permalink() ), 'format' => '', 'total' => $max_page, 'echo' => false, 'add_fragment' => '#comments', ); if ( paginate_comments_links($args) ) { ?>
". esc_html( ampforwp_translation( $redux_builder_amp['amp-translator-comments-closed'], 'Comments are closed' ) )."

"; }?>
'; } else { $facebook_comments_markup = '
'; $facebook_comments_markup .= 'post_name; $disqus_script_host_url = "https://ampforwp.appspot.com/?api=". AMPFORWP_DISQUS_URL; if( $redux_builder_amp['ampforwp-disqus-host-position'] == 0 ) { $disqus_script_host_url = esc_url( $redux_builder_amp['ampforwp-disqus-host-file'] ); } $disqus_url = $disqus_script_host_url.'?disqus_title='.$post_slug.'&url='.get_permalink().'&disqus_name='. esc_url( $redux_builder_amp['ampforwp-disqus-comments-name'] ) ."/embed.js" ; ?>
width= layout="" sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts" frameborder="0" data-block-on-consent src="" >
ID, $srcUrl); $srcUrl = add_query_arg('apiKey' , $apiKey, $srcUrl); $srcUrl = add_query_arg('title' , $post->post_title, $srcUrl); $vuukle_html = '
Show comments
'; echo $vuukle_html; } function ampforwp_framework_get_spotim_comments(){ global $post, $redux_builder_amp; $spotId =''; if( isset($redux_builder_amp['ampforwp-spotim-comments-apiKey']) && $redux_builder_amp['ampforwp-spotim-comments-apiKey'] !== ""){ $spotId = $redux_builder_amp['ampforwp-spotim-comments-apiKey']; } $srcUrl = 'https://amp.spot.im/production.html?'; $srcUrl = add_query_arg('spotId' ,get_permalink(), $srcUrl); $srcUrl = add_query_arg('postId' , $post->ID, $srcUrl); $spotim_html = '
Load more...
'; echo $spotim_html; } // Comments Scripts add_filter( 'amp_post_template_data', 'ampforwp_framework_comments_scripts' ); function ampforwp_framework_comments_scripts( $data ) { $facebook_comments_check = ampforwp_framework_get_facebook_comments(); global $redux_builder_amp; $is_pb_enabled = ''; $is_pb_enabled = checkAMPforPageBuilderStatus(get_the_ID()); $display_comments_on = ""; $display_comments_on = ampforwp_get_comments_status(); if ( $facebook_comments_check && $redux_builder_amp['ampforwp-facebook-comments-support'] && $display_comments_on && !is_front_page() && !$is_pb_enabled ) { if ( empty( $data['amp_component_scripts']['amp-facebook-comments'] ) ) { $data['amp_component_scripts']['amp-facebook-comments'] = 'https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js'; } } if ( $redux_builder_amp['ampforwp-disqus-comments-support'] && $display_comments_on && comments_open() && !$is_pb_enabled ) { if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) { if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) { $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js'; } } } if ( isset($redux_builder_amp['ampforwp-vuukle-comments-support']) && $redux_builder_amp['ampforwp-vuukle-comments-support'] && $display_comments_on && comments_open() && !$is_pb_enabled ) { if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) { $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js'; } if ($redux_builder_amp['ampforwp-vuukle-Ads-before-comments']==1 && empty( $data['amp_component_scripts']['amp-ad'] ) ) { $data['amp_component_scripts']['amp-ad'] = 'https://cdn.ampproject.org/v0/amp-ad-0.1.js'; } } //spotim if ( isset($redux_builder_amp['ampforwp-spotim-comments-support']) && $redux_builder_amp['ampforwp-spotim-comments-support'] && $display_comments_on && comments_open() ) { if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) { $data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js'; } } return $data; }