Override login form for community events

Home Forums Calendar Products Community Events Override login form for community events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1372733
    Chris Reynolds
    Participant

    I’m trying to follow the advice given here:

    https://theeventscalendar.com/support/forums/topic/login-page-template-for-community-events/#post-1007011

    I would like logged-out users to be redirected to a different page.

    I have added the following code to the top of a template that I added to the child-theme folder:

    if ( !is_user_logged_in()) {
    wp_redirect( get_page_link(20317) );
    exit;
    }

    20317 is the id of the page I want to re-direct to.

    Unfortunately, this doesn’t seem to do anything.

    This is on the page https://bicyclist.xyz/events/community/add/

    I’ve also included a screenshot of the folder structure for the template I added to my child theme.

    #1373483
    Geoff B.
    Member

    Good evening Chris and welcome back!

    Thank you for reaching out to us.
    I would love to help you with this topic.

    I believe the issue is with the way you are calling 20317.
    You would probably have better success by calling a variable and giving that variable a value of 20317.

    For example $pagedest = ‘20317’; and wp_redirect( get_page_link($pagedest) );

    Most of our users just install https://wordpress.org/plugins/theme-my-login/

    This gives them total control over the user login experience, including on the chosen logout page.

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1373671
    Chris Reynolds
    Participant

    Hi Geoff-

    OK, I added this to the

    $pagedest = ‘20317’;

    if ( !is_user_logged_in()) {
    wp_redirect( get_page_link($pagedest) );
    exit;
    }

    but doesn’t redirect.

    We’re using the Ultimate Member plugin and it loads the correct login form, the issue is that the register button links to a page for base level members to register, but for adding events, we need to show the user a login/register page specific to the role that can add/edit events, a higher role.

    Thanks in advance for the help!

    #1374217
    Geoff B.
    Member

    Good evening Chris,

    I am sorry my suggestion did not help.

    To help you further could you please send me a copy of the latest version of your WordPress theme AND child theme via a link to a .zip file link (stored Dropbox or Google Drive) so that I can run some tests on my end ? I recommend a private reply for that purpose.

    Please ensure you are using the latest files as found on your actual website.
    This way I will get access to any updates or customizations you might have made.

    That way I can see the whole code in its context.

    Secondly, just to set expectations, the scope of our support is mostly to get our customers started on the right track and to help them in case of issues.

    We unfortunately do not provide complete support for customization.

    With that in mind, I will hopefully be able to get you going.

    Have a great day!

    Geoff B.

    #1390784
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Override login form for community events’ is closed to new replies.