Blog Comments Tabs

Embed Disqus, forum replies, and other conversation platforms to your comments section.

Preview PHP

Paste the following into your functions.php file (easy), or to loader.php (advanced)

Click to copy
<?php
/**
 * Manipulate page templates.
 *
 * @since 1.0
 */

function md_child_templates() {

	// Load new tabs
	if ( md_has_comments() ) {
		add_action( 'md_comments_tabs', 'md_comments_wp_tab' );
		add_action( 'md_comments_tabs', 'md_child_disqus_tab' );
		add_action( 'md_hook_comments', 'md_child_disqus_embed' );
	}

}
add_action( 'template_redirect', 'md_child_templates' );

/**
 * Disqus tab link.
 *
 * @since 1.0
 */

function md_child_disqus_tab() { ?>
	<span id="md_disqus_tab" class="comment-tab md-tab active" data-tab="md_disqus" data-post-id="<?php echo get_the_ID(); ?>"><i class="md-icon-comments"></i> <?php echo __( 'Disqus', 'md-child' ); ?></span>
<?php }

/**
 * Disqus embed code.
 *
 * @since 1.0
 */

function md_child_disqus_embed() { ?>

	<div id="md_disqus" class="disqus-comments active block-mid-tb block-full-lr md-tab-content">
		<p>Enter Disqus embed code here.</p>
	</div>

<?php }

How to Add Comment Tabs for Multiple Comments Plugins

Most comments plugins take over the default comments section, but sometimes you want to offer multiple comments sections for your forums, Disqus, and other kinds of discussion features.

With a few simple actions in MD you can bypass this limitation and embed conversation platforms from others sites without losing your hard earned blog comments.

Start Building Websites That Delight

You can use the Marketers Delight WordPress Theme on unlimited sites. New features & updates are delivered to sites with your active license key.

Add to Cart

Start building your website with MD now

Get started with MD today. Pay once for use on unlimited websites.
* Save 40% on license key renewals every 12 months. Get auto-updates sent to 5 websites.

Start building smarter websites today

You can use the Marketers Delight WordPress Theme on unlimited sites.

New features & updates are delivered to sites with your active license key.

Add to Cart — $97

  • 5 sites license
  • 1 year of updates
  • Full access to downloads
  • Verified forums account
  • Save 40% on renewals