• Resolved erikrolfsen

    (@erikrolfsen)


    I would like the registration button on this page to simply link to the specified URL of an external website, rather than showing a dropdown which then links to the very page the user is already on.

    I saw a similar request from two years ago, but I tried changing to the code provided and it did not work.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Rita Kikani

    (@kikanirita)

    Hi @erikrolfsen ,

    To change the layout of registration on single event page, you need to override below template files at your theme side.

    wp-content\plugins\wp-event-manager\templates\event-registration.php

    wp-content\plugins\wp-event-manager\templates\event-registration-url.php

    The above two files, you need to copy and just paste in your theme_folder\wp-event-manager and change as per your requirement. In “event-registration.php” file, you will find the button, and in “event-registration-url.php” file, you will get the code for URL link.

    You can read how to override the template filr from here : https://wp-eventmanager.com/knowledge-base/how-override-archive-template/

    Thank you.

    Thread Starter erikrolfsen

    (@erikrolfsen)

    Hmm, I don’t have anything named wp-event-manager in my theme folder. The only place I’ve seen that is in my plugins folder.

    Hi @kikanirita
    copying files doesn’t help

    ”?change as per your requirement. In “event-registration.php” file, you will find the button, and in “event-registration-url.php” file, you will get the code for URL link.”
    what changes should we make to get url worked in a proper way?

    Plugin Author Rita Kikani

    (@kikanirita)

    Hi @erikrolfsen , You have to create folder “wp-event-manager” in your theme.

    Plugin Author Rita Kikani

    (@kikanirita)

    Hi @affso ,

    you need to write below code in your theme side “event-registration.php” file and your query would be resolve.

    <?php if($register = get_event_registration_method()) :
    
        if($register->type) : ?>
    
            <div class="event_registration registration">
    
                <?php do_action('event_registration_start', $register); ?>
    
                <div class="wpem-event-sidebar-button wpem-registration-event-button">
    
                    <a class="wpem-theme-button" href="<?php echo esc_url($register->url); ?>" target="_blank" rel="nofollow" >
    
                        <?php _e('Register for event', 'wp-event-manager'); ?>
    
                    </a>
    
                </div>
    
            </div>
    
        <?php endif;
    
    endif; ?>

    Thank you.

    Doesn’t work, “url” is empty.
    But I see that you are working on it
    https://github.com/wpeventmanager/wp-event-manager/issues/1445

    And in meta keys there is no _event_registration_url
    there is only _event_registration_email

    • This reply was modified 1 year, 7 months ago by affsovet.
    Plugin Author Rita Kikani

    (@kikanirita)

    Hello @affso ,

    For the information only, we used _event_registration_email either it is email or it is url, but when the value fetch from meta to display on single event page, we verified that if the format of value is like email then will return as a email else the format is like url then will return url and display url link on single event page.

    Issue already resolve in github, so please use the latest version from github repository 3.1.37.

    • This reply was modified 1 year, 7 months ago by Rita Kikani.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Make registration button link to external URL’ is closed to new replies.