Skip to content

Instantly share code, notes, and snippets.

View jimmyrosen's full-sized avatar

Jimmy Rosén jimmyrosen

View GitHub Profile
@jimmyrosen
jimmyrosen / gist:3854286
Created October 8, 2012 19:08
Simple fields
// this function gets staff data from a staff database and displays it.
// front-end wise we will get a sweet "select post" box in the admin gui. from here we select the staff member and that person is displayed on this page.
// And yes. the values could be imported a lot prettier. You do it!
$staff_selectors = simple_fields_get_post_group_values(get_the_id(), "Personallistning", true, 1);
$staff_count = 1;
foreach ($staff_selectors as $staff) {
foreach($staff as $staffmember) {