Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

http://swen.me.uk/creepypastaindex/

share|improve this question
2  
How did you try that? Couldn’t you just use the callback functions for the shortcode handlers? –  toscho Oct 17 '12 at 18:03
    
I didn't know this was possible outside of the loop. Thanks! –  Swen Oct 18 '12 at 14:29
add comment

2 Answers

up vote 0 down vote accepted

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>
share|improve this answer
1  
I'm using the do_shortcode tag now. Thanks a bunch! –  Swen Oct 18 '12 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 Oct 18 '12 at 14:38
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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