Instantly share code, notes, and snippets.

What would you like to do?
Office Hours in Profile
// Your profile type editor should include custom fields similar to this
Monday Office Hours -> text (one line)
ID: profiles_4
Tuesday Office Hours -> text (one line)
ID: profiles_5
Wednesday Office Hours -> text (one line)
ID: profiles_6
Thursday Office Hours -> text (one line)
ID: profiles_7
Friday Office Hours -> text (one line)
ID: profiles_8
// Below assumes a Profile Type with fields set up as above.
// Profile IDs will need to be adjusted based on actual field IDs.
// Place this code in profiles.php where you want the table to appear.
<xphp content="true" ifmode="or">
<if var="profiles_4"/>
<if var="profiles_5"/>
<if var="profiles_6"/>
<if var="profiles_7"/>
<if var="profiles_8"/>
<div class="office-hours">
<caption>Office Hours</caption>
<td><xphp var="profiles_4" inner="true" /></td>
<td><xphp var="profiles_5" inner="true" /></td>
<td><xphp var="profiles_6" inner="true" /></td>
<td><xphp var="profiles_7" inner="true" /></td>
<td><xphp var="profiles_8" inner="true" /></td>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment