Support » Plugin: Events Manager » [Plugin: Events Manager] Conditional use of #_EVENTURL

  • Resolved cucocreative

    (@cucocreative)


    Hi all

    New to Events Manager (5.1.6) and trying to customise the events listing page.

    My client has two types of events – free and paid. A free listing will not have a link to a single events page and will only appear in the events listing page with the limited information displayed there. A paid listing will have a more button using the default #_EVENTURL to create the link.

    The question is how to make this button appear on condition of a custom field being checked for the event.

    I have created a custom field “events_more_button”, which can be blank or return a ‘Yes’ value. On a normal WP php template I would just add:

    <?php $key="events_more_button"; $value = get_post_meta($post->ID, $key, true);  if (!empty($value)) { ?>
    	<a class="button icon small fRight" href="#_EVENTURL"><span class="arrow">More</span></a>
    <?php } ?>

    This would display nothing if the custom field is empty, but if it is ‘Yes’ you would see the button.

    How do I add in this functionality? I can’t use php code within EM>Setting>Formats/Layouts>Events Format>Default event list format, so how can this be achieved?

    Any advice much appreciated.

    http://wordpress.org/extend/plugins/events-manager/

Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Events Manager] Conditional use of #_EVENTURL’ is closed to new replies.