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 }