Help with Redirecting the login page

This topic contains 5 replies, has 2 voices, and was last updated by  Paolo 9 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #44456

    veneuphoria
    Expired Member
    Post count: 69

    I am trying to Redirect the log in page becasue I added BuddyPress. I followed the direction here https://wpgeodirectory.com/docs/redirecting-the-login-page/

    I have avada. I do not have a child theme folder. I have tried adding a child theme folder and a new functions.php to it.

    /veneuphoria.org/wp-content/themes/GDF_Child/functions.php

    I added this exact text to the functions.php (this is the entire document):

    
    
    <?php
    
    add_action(‘init’ , ‘geodir_redirect_to_default_login’) ;
    function geodir_redirect_to_default_login()
    {
    if(isset( $_REQUEST['geodir_signup']))
    {
      wp_redirect(home_url().’/my-account’);
      exit();
    }
    }
    ?>

    It does not work (site still working but function of changing the redirect does not change the login)

    I have also tried adding it to the Functions.php in avada
    /veneuphoria.org/wp-content/themes/Avada/functions.php

    I added this exact text to that file right at the beginning of the php file as seen below starting at

    /* added by me to overrride the login redirect*/

    and ending before

    class Avada {

    <?php

    
    
    
    /* Options Framework */
    require_once( get_template_directory() . '/framework/admin/index.php' );
    
    /**
     * The main theme class
     * Any additional assets, objects etc should be included and instantiated from here.
     * This is a work in progress and part of a larger rewrite that will happen over time.
     */
    
    /* added by me to overrride the login redirect*/
    
        <?php
    
        add_action(‘init’ , ‘geodir_redirect_to_default_login’) ;
        function geodir_redirect_to_default_login()
        {
        if(isset( $_REQUEST['geodir_signup']))
        {
          wp_redirect(home_url().’/my-account’);
          exit();
        }
        }
        ?>
    
    class Avada {
    

    It still does not seem to work. What am I doing wrong

    Thank you!

    #44460

    Paolo
    Site Admin
    Post count: 31206

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #44466

    veneuphoria
    Expired Member
    Post count: 69

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #44469

    Paolo
    Site Admin
    Post count: 31206

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #44484

    veneuphoria
    Expired Member
    Post count: 69

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #44487

    Paolo
    Site Admin
    Post count: 31206

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount