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!