Support

Home Forums Event Espresso Premium Register link in Upcoming Events Loop

Register link in Upcoming Events Loop

Posted: October 29, 2014 at 5:41 pm

Viewing 1 reply thread


steeleb88

October 29, 2014 at 5:41 pm

Here is my loop. I’m looking to display a register button if the event is active and tickets are on sale. The developer docs are a bit overwhelming. What would be the best to display a custom button that will take the user to the registration page?


foreach($posts_array as $post){

    $event_obj = $post->EE_Event;
    $event_id = $event_obj->ID();
    $event_name = $event_obj->name();
    $event_desc = $event_obj->description();
    $on_sale = $event_obj->tickets_on_sale();

    echo '<div class="small-12 large-'.$col_size.' columns">';
        echo '<div class="event-wrap">';
            echo '<h3>'.$event_name.'</h3>';
            echo '<span class="date">';
                    espresso_event_date('M jS, Y', null, $event_id);
            echo '</span>';
            echo '<p class="desc">'.$event_desc.'</p>';
            if($on_sale){
                //espresso_event_reg_button('Register Now', 'Registration Closed', $event_id);
            }
            echo $event_obj->get_active_status();
        echo '</div>';
    echo '</div>';

}

The espresso_event_reg_button is displaying “registration is closed” even though the events are open and can be registered. Plus, I’d like to use different markup for the button.


Lorenzo Orlando Caum

  • Support Staff

October 29, 2014 at 7:04 pm

Hi,

How about creating a button around this link?

espresso_event_link_url()

https://eventespresso.com/wiki/ee4-themes-templates/


Lorenzo

Viewing 1 reply thread

The support post ‘Register link in Upcoming Events Loop’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso