not able to add subscribe to newsletter shortcode at end of blog page. want to add after pagination and before footer. anybody know how to add? the page i am working on Website

  • have you looked at do_shortcode ? it lets you run a shortcode from PHP. You could add it at the end of your main index.php.
    – mozboz
    Jul 20, 2020 at 12:22

1 Answer 1


I would suggest using do_shortcode as mozboz suggested. But I think that using the single.php file is a better way of doing it. The template you should use will depend on how your theme is structured, but if the element is supposed to always display after a post then editing the main template is the best way to do it.

  • After adding the <?php echo do_shortcode('[name_of_shortcode]'); ?> code into single-blog.php getting error Website Experiencing technical difficulties
    – ShubhamK
    Jul 21, 2020 at 11:35
  • Would you be able to specify if use kept the square brackets around ('[name_of_shortcode]') or if you just used ('name_of_shortcode') in your final code? Jul 28, 2020 at 12:16
  • Getting a WordPress PHP error could also be caused by other factors. I would suggest checking the error.log file to see what the actual issue might be. Unfortunetely WP doesn't like to be specific about its error codes. Jul 28, 2020 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.