Forums

How to link to wordpress registration page? (6 posts)

  1. GLB
    Member
    Posted 1 year ago #

    How do I link my registration button (non-wordpress index page) to my wordpress blog registration page?(subdirectory?). I am using wordpress version 2.3. This is the index registration link I am trying to edit:

    <li><a href="#">Register</a></li>

  2. mfields
    Member
    Posted 1 year ago #

    Hi. in the event that youe non-WP index is including wordpress functions, the following will work for you:

    This code has been condensed from `wp-login.php'

    <?php if (get_option('users_can_register')) : ?>
    	<li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=register"><?php _e('Register') ?></a></li>
    <?php endif; ?>

    If not, hard-code the following:

    <li><a href="http://your-domain/your-subdirectory/wp-login.php?action=register">Register</a></li>

    Hope this works,
    -Mike

  3. GLB
    Member
    Posted 1 year ago #

    I will check this out. Right now. Thanks Mike!

  4. GLB
    Member
    Posted 1 year ago #

    Yeah! it does work! Hard-coded. Um..how do I include WP functions in my non-WP index? What is meant by that? Sounds like something I would really like.

  5. mfields
    Member
    Posted 1 year ago #

    Glad it worked for you. Below you will find a condensed bit of code taken from a site that I maintain. The page in question is not a wordpress page at all, but a php file in the web root...

    <?php
    	require_once '/root_file_path/web_root/wp-config.php';
    	require_once '/root_file_path/web_root/wp-settings.php';
    
    get_header();
    
    ##Content here!!!
    
    get_sidebar();
    
    get_footer();
    ?>

    Hope this helps,
    -Mike

  6. GLB
    Member
    Posted 1 year ago #

    By web root... I'm assuming you mean 'web root directory' aka 'xampp/htdocs' Very interesting. I'm on it.

Topic Closed

This topic has been closed to new replies.

About this Topic