Run shortcode at the end of post content / before comments

I’m trying to use do_shortcode in single.php. Despite the fact I put it after

<?php get_template_part('content'); ?>

the shortcode is executed at the beginning of the page. What I’m trying to achieve is running the shortcode as soon as the user reaches a specific part of the page (let’s say the end of the post, just before comments).

Read More

What should I add to the code to make it happen?

The code I’m inserting is:

<?php echo do_shortcode('[EPSB]'.<div class="fb-like" data-width="200" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div>.'[/EPSB]'); ?>

Thanks in advance. Sorry for the vague description, I’m new to wordpress coding.

Related posts

Leave a Reply

1 comment

  1. This

    <?php echo do_shortcode('[EPSB]'.<div class="fb-like" data-width="200" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div>.'[/EPSB]'); ?>
    

    Should be this

    <?php echo do_shortcode('[EPSB]<div class="fb-like" data-width="200" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div>[/EPSB]'); ?>