Title: Do_shortcode ignored
Last modified: August 22, 2016

---

# Do_shortcode ignored

 *  Resolved [dragongamer54](https://wordpress.org/support/users/dragongamer54/)
 * (@dragongamer54)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/do_shortcode-ignored/)
 * Hey all
 * I’m having issues printing a page that contains a do_shortcode in it’s theme 
   file.
 * The shortcode does get printed if it is pasted within a post but if it is ‘hardcoded’
   in a theme file it doesn’t get printed.
 * How can I resolve this issue? The shortcode is required to be hardcoded into 
   the theme file.
 * [https://wordpress.org/plugins/wp-print/](https://wordpress.org/plugins/wp-print/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/do_shortcode-ignored/#post-5782664)
 * Maybe you can do
 * `$content .= do_shortcode( '[shortcode]' )` after line [https://github.com/lesterchan/wp-print/blob/master/wp-print.php#L229](https://github.com/lesterchan/wp-print/blob/master/wp-print.php#L229)
 * It is not tested. If it does not work then you probably have to place around 
   with the placement of the code but the idea is there.
 * Alternatively you can put it in [https://github.com/lesterchan/wp-print/blob/master/print-posts.php](https://github.com/lesterchan/wp-print/blob/master/print-posts.php)
 *  Thread Starter [dragongamer54](https://wordpress.org/support/users/dragongamer54/)
 * (@dragongamer54)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/do_shortcode-ignored/#post-5782719)
 * Hey Lester
 * Thanks for the fast response. I think I’ll go for the second method.
 * Do you also have a suggestion/solution for do_shortcode’s in multiple different
   theme files?
 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/do_shortcode-ignored/#post-5782724)
 * Unfortunately no, personally I will not do_shortcode in themes. It seems wrong
   though.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Do_shortcode ignored’ is closed to new replies.

 * ![](https://ps.w.org/wp-print/assets/icon.svg?rev=978022)
 * [WP-Print](https://wordpress.org/plugins/wp-print/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-print/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-print/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-print/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-print/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-print/reviews/)

## Tags

 * [do_shortcode](https://wordpress.org/support/topic-tag/do_shortcode/)
 * [hardcoded](https://wordpress.org/support/topic-tag/hardcoded/)

 * 3 replies
 * 2 participants
 * Last reply from: [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/do_shortcode-ignored/#post-5782724)
 * Status: resolved