Using custom placeholder input values to call information
-
I am trying to understand using placeholders. As a simple example, #_ATT{group}{men|women}.
I want to use #_ATT{group}{men|women} to call information about two different groups. I want to identify the group using the custom attribute and then code the output into the shortcode.
[events_list]#_EVENTNAME {has_group}{men}Has info about a group men{/has_group}{/men}{has_group}{women}Has info about a group of women{/has_group}{/women}[/events_list]I used this in my functions file
// #_ATT{group}{men|women} case 'has_att_PayPal_Shortcode_for_GP': if (is_array($EM_Event->event_attributes) && !empty($EM_Event->event_attributes['group'])) $replacement = preg_replace('/\{\/?has_att_group\}/', '', $match); else $replacement = ''; break;
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Using custom placeholder input values to call information’ is closed to new replies.