• Resolved njs

    (@njs)


    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://ww.wp.xz.cn/plugins/wp-spamshield/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor redsand

    (@redsand)

    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 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

    (@njs)

    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

    (@redsand)

    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.