• Hello,

    I am trying to add the WordPress registration form to homepage through template.

    I got as far as creating front-page.php and I am not sure where to go from here.

    Ideally Front page/homepage will have logo, a short description of the site and the registration form.

    Any help with this would be appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You can simply hardcode the logo as an HTML <img> tag, just be sure you don’t put the HTML inside a PHP block. If the short description you want is the tagline entered in Settings, use this code:
    <?php echo get_bloginfo('description'); ?>
    Otherwise you could just hardcode this as well.

    As for the registration form, I don’t think there is a handy WP function to output this. There’s a slight chance this will not work, but try simply copying into your template the entire <form><!-- registration content here --></form> block from the source view of your browser when displaying the default registration form.

    Place all of this where ever you want the form to appear in the normal HTML flow of the template. Note that anytime you alter a theme, you should create a child theme so your changes are protected when the theme updates.

    Thread Starter Sofia55

    (@sofia55)

    Yes, I do have a child theme set up. Starting out, I thought there would be a simple get function that would get the registration form but no luck. The WordPress functions I have tried have either resulted in the form being displayed but not working; or the form not displaying at all.

    I tried your example above and the it does display the form perfectly but the form does not work.

    I think that I will just stick to having a link to the registration page. Seems like the hassle-free way to go.

    Thanks for the help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Registration form on front page’ is closed to new replies.