This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php global $video_metabox; $video_metabox->the_meta(); ?> | |
<?php if ( $video_metabox->have_value( 'vids' ) ) { ?> | |
<ul class="project_videos"> | |
<?php while( $video_metabox->have_fields('vids') ) { ?> | |
<?php echo wp_oembed_get( $video_metabox->the_value( 'videourl' ) ); ?> | |
<?php } ?> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$custom_metabox = new WPAlchemy_MetaBox(array | |
( | |
'id' => '_custom_meta', | |
'title' => 'My Custom Meta', | |
'template' => get_stylesheet_directory() . '/custom/meta.php', | |
'output_filter' => 'my_output_filter', | |
)); | |
function my_output_filter ( $post_id ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="carousel"> | |
<a href="#" class="prev"> </a> | |
<ul id="mycarousel" class="jcarousel-skin-carousel"> | |
<?php global $ad_metabox; ?> | |
<?php query_posts('post_type=ad&showposts=-1') ?> | |
<?php if (have_posts()) : ?> | |
<?php while (have_posts()) : the_post(); ?> | |
<li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php global $custom_checkbox_mb; | |
$custom_checkbox_mb->the_meta(); | |
if ($custom_checkbox_mb->have_value('cb_ex2')) { ?> | |
<ul> | |
<?php while($custom_checkbox_mb->have_fields('cb_ex2')) { ?> | |
<li><?php $custom_checkbox_mb->the_value(); ?></li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="my_meta_control"> | |
<h4>Links</h4> | |
<a href="#" class="dodelete-links button">Remove All Links</a> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras orci lorem, bibendum in pharetra ac, luctus ut mauris.</p> | |
<?php while($mb->have_fields_and_multi('links')): ?> | |
<?php $mb->the_group_open(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global $my_metabox; | |
$output = array(); | |
while( $my_metabox->have_fields( 'my_fields' ) ) | |
{ | |
array_push( $output, sprintf( $my_metabox->get_the_value( 'my_value' ) ) ); | |
} | |
echo join(', ', $output); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global $basic_info; | |
// $posts is a list of posts for which you have meta data for | |
foreach ( $posts as $post ) | |
{ | |
$meta = $basic_info->the_meta( $post->ID ); | |
if ( isset( $meta['basic_info'] ) ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class cfd_user { | |
protected $profile_fields = array( | |
'user_login' => null, | |
'user_nicename' => null, | |
'user_url' => null, | |
'user_email' => null, | |
'display_name' => null, | |
'nickname' => null, | |
'first_name' => null, | |
'last_name' => null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_custom_template( $output, $data ) { | |
// loop $data['items'], use post ID, to get additional meta data if needed | |
// ... | |
// filter by type to output different templates | |
if ( 'coverage' == $data['type'] ) { | |
ob_start(); | |
// $data variable is available inside PHP file |