Skip to content

Instantly share code, notes, and snippets.

@kirstenkeister
kirstenkeister / project-staff
Created Feb 23, 2012
Repeating fields for project pages
View project-staff
<?php
global $project_mb;
$project_mb->the_meta();
$i = 0;
while($project_mb->have_fields('links') || $project_mb->have_fields('paststaff') ) {
if($i == 0)
{ ?>
<div id="info-staff" class="column left">
@kirstenkeister
kirstenkeister / content-person.php
Created Jan 31, 2012 — forked from jdickie/content-person.php
WPAlchemy meta definitions for repeating links
View content-person.php
<?php
global $peoplelinks_mb;
$peoplelinks_mb->the_meta();
while($peoplelinks_mb->have_fields('links')) {
?>
<?php
if(is_first()) { ?>
<div id="info-links" class="column left">
<h2 class="column-title">Links</h2>
<ul>
@kirstenkeister
kirstenkeister / content-person.php
Created Jan 19, 2012
WPAlchemy meta definitions for repeating links
View content-person.php
<?php
global $peoplelinks_mb;
$peoplelinks_mb->the_meta();
if ($peoplelinks_mb->have_fields('links')) { ?>
<div id="info-links" class="column left">
<h2 class="column-title">Links</h2>
<ul>
<?php // loop a set of field groups
@kirstenkeister
kirstenkeister / project-meta.php
Created Jan 4, 2012
WPAlchemy meta definitions for project-meta (working, hardcoded)
View project-meta.php
<div class="my_meta_control">
<a style="float:right; margin:0 10px;" href="#" class="dodelete-links button remove-all">Remove All</a>
<label>Project Staff<span>(current Staff associated with the project)</span></label>
<p>Add staff to project by selecting them from the dropdown. Add addtional staff by clicking the "Add Staff" button.</p>
<?php while($mb->have_fields_and_multi('links')): ?>
<?php $mb->the_group_open(); ?>
<?php
@kirstenkeister
kirstenkeister / project-meta.php
Created Jan 4, 2012
WPAlchemy meta definitions for project-meta
View project-meta.php
<div class="my_meta_control">
<a style="float:right; margin:0 10px;" href="#" class="dodelete-links button remove-all">Remove All</a>
<label>Project Staff<span>(current Staff associated with the project)</span></label>
<p>Add staff to project by selecting them from the dropdown. Add addtional staff by clicking the "Add Staff" button.</p>
<?php while($mb->have_fields_and_multi('links')): ?>
<?php $mb->the_group_open(); ?>
@kirstenkeister
kirstenkeister / people-links-meta.php
Created Nov 10, 2011
WPAlchemy meta definitions for people-links
View people-links-meta.php