0

I'm trying to create a front-end registration form for my Wordpress website. The registration form is in the header, so any plugins I've seen don't work as they use shortcodes.

Look at my website for a better explanation. I want the registration form to work in the dropdown box at the top of the page.

2
  • 2
    How did you try that? Couldn’t you just use the callback functions for the shortcode handlers?
    – fuxia
    Commented Oct 17, 2012 at 18:03
  • I didn't know this was possible outside of the loop. Thanks!
    – Swen
    Commented Oct 18, 2012 at 14:29

2 Answers 2

1

If you were to use a plugin that uses shortcode you can call it in your template by using this in your template:

<?php echo do_shortcode ('[your-shortcode]'); ?>

You can also do something similar to this form / code below for a front end login:

<form method="post" action="<?php bloginfo('url') ?>/wp-login.php" class="wp-user-form">
            <div class="username">
                <label for="user_login"><?php _e('Username'); ?>: </label>
                <input type="text" name="log" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" id="user_login" tabindex="11" />
            </div>
            <div class="password">
                <label for="user_pass"><?php _e('Password'); ?>: </label>
                <input type="password" name="pwd" value="" size="20" id="user_pass" tabindex="12" />
            </div>
            <div class="login_fields">
                <div class="rememberme">
                    <label for="rememberme">
                        <input type="checkbox" name="rememberme" value="forever" checked="checked" id="rememberme" tabindex="13" /> Remember me
                    </label>
                </div>
                <?php do_action('login_form'); ?>
                <input type="submit" name="user-submit" value="<?php _e('Login'); ?>" tabindex="14" class="user-submit" />
                <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
                <input type="hidden" name="user-cookie" value="1" />
            </div>
        </form>
2
  • 1
    I'm using the do_shortcode tag now. Thanks a bunch!
    – Swen
    Commented Oct 18, 2012 at 14:29
  • Glad to of helped. :) if this worked for you please do not forget to up vote and accept as your answer. @Swen
    – Nicole
    Commented Oct 18, 2012 at 14:38
0

I recently needed similar stuff and went with a sliding panel. Released it on plugins repo - schemeable-sliding-panel. See whether it suits your requirement.

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.