Title: Shortcode in template
Last modified: August 24, 2016

---

# Shortcode in template

 *  Resolved [njs](https://wordpress.org/support/users/njs/)
 * (@njs)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-7/)
 * Hi
    For some reason, the shortcode only seems to work in the Visual Editor, not
   in the template like other shortcodes can do. Being able to use the following
   would be useful as sometimes it’s necessary to keep certain things in the template
   and away from client’s hands…
 * `echo do_shortcode('[spamshieldcontact]');`
 * Not essential but would be useful.
    Thanks
 * [https://wordpress.org/plugins/wp-spamshield/](https://wordpress.org/plugins/wp-spamshield/)

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

 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-7/#post-6042120)
 * Hi njs,
 * Yes, that’s how it’s supposed to work.
 * Please see the plugin documentation section on [Installing a WordPress Contact Form on Your Blog](http://www.redsandmarketing.com/plugins/wp-spamshield/#wpss_adding_contact_form)
   for more information on usage and implementation.
 * The following is from the documentation:
 * > First create a distinct page (not post) where you want to have your contact
   > form.
   > …
   > The page you place the contact form on should have its own URL, and not be 
   > used as the homepage of your site. It also cannot be implemented as part of
   > a widget or theme element, such as a footer, sidebar, etc.
 * The implementation of the contact form can only be done on a page, through the
   editor. The contact form included in the plugin is meant to be a simple drop-
   in contact form for a contact page that won’t get spammed. One of the core values
   of the plugin is to keep the code lightweight and lean, which is one reason we
   don’t offer that particular implementation option you’re requesting.
 * I hope that helps answer your question. Let me know if you ever need help again.
 * – Scott
 *  Thread Starter [njs](https://wordpress.org/support/users/njs/)
 * (@njs)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-7/#post-6042368)
 * Hi Scott
 * Ok thanks – I suppose I thought echoing a shortcode would be automatically possible
   without any extra development.
 * No big deal, I just prefer to avoid shortcodes in the Visual Editor as you always
   get some clients who accidentally delete them when they are updating content.
 * Thanks
 *  Plugin Contributor [redsand](https://wordpress.org/support/users/redsand/)
 * (@redsand)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-7/#post-6042375)
 * Hi njs,
 * You’re welcome. It’s not implementing the shortcodes that I was referring to…
   its the overall contact form functionality that would require different coding.
 * I understand. You’re welcome. Have a good one.
 * – Scott

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

The topic ‘Shortcode in template’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-spamshield_08293a.svg)
 * [WP-SpamShield](https://wordpress.org/plugins/wp-spamshield/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-spamshield/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-spamshield/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-spamshield/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-spamshield/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-spamshield/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [redsand](https://wordpress.org/support/users/redsand/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-7/#post-6042375)
 * Status: resolved