Display Events from Multiple States
-
I’m setting up a site and taking user submissions, and I’ve run into a problem: in the location form, the state field can be filled out a number of ways. For example, the state of Iowa can be written “Iowa”, “IA”, or “ia”. If I then try to display all events taking place in Iowa on a page, I cannot seem to write code that will display events from all three spellings without making three separate lists. For example, the code below (with comma-spaced variations) does not work. Any ideas? I’m just trying to make this as foolproof as possible so new submissions don’t always have to be double-checked for state formatting.
<?php if (class_exists(‘EM_Events’)) { echo EM_Events::output( array(‘limit’=>10,’orderby’=>’name’, ‘state’=>’IA, Iowa, iowa’) );
} ?>
The topic ‘Display Events from Multiple States’ is closed to new replies.