Skip to content

Instantly share code, notes, and snippets.

@ramseyp
Last active August 29, 2015 14:07
Show Gist options
  • Save ramseyp/4668fe23da11f7632dec to your computer and use it in GitHub Desktop.
Save ramseyp/4668fe23da11f7632dec to your computer and use it in GitHub Desktop.
<?php
remove_action('genesis_loop', 'genesis_do_loop');
add_action('genesis_loop', 'custom_loop');
function custom_loop() {
echo '<h1 class="entry-title" itemprop="headline">'.get_the_title().'</h1>';
echo '<div class="clear"></div>';
echo '<div class="singlebio">';
echo '<div class="biotop">';
echo '<div class="one-half singleimage">';
echo '<img src="' . the_post_thumbnail( 'biography' ). '" />';
echo '</div>';
echo '<div class="one-half singleabout ">';
the_post();
$con=get_the_content();
echo '<p>'.$con.'</p>';
echo '</div>';
echo '<div class="clear"></div>';
echo '</div>';
echo '<div class="biomiddle">';
$rows = get_field('member_quality');
if($rows)
{
foreach($rows as $row)
{
echo '<div class="biomid">';
echo '<div class="one-half">';
echo '<div><b>'.$row['heading'].'</b></div>';
echo '</div>';
echo '<div class="one-half">';
echo '<div>'.$row['description'].'</div>';
echo '</div>';
echo '<div class="clear"></div>';
echo '</div>';
}
}
echo '</div>';
echo '<strong>Career summary</strong>';
echo '<div class="biobottom">';
$pgmeta = get_post_custom();
var_export( $pgmeta );
// You should get an array returned with all the custom fields in it. One of them should be "career_summary".
// If $pgmeta is empty, then you might have something out of alignment with the $post object.
// Might need to declare " global $post; ", then use the $post->ID parameter in the get_post_custom() function.
// If you can see the right custom field in the array, then you should be able to use that get_field() function.
// get_field(), too, might need the post ID. I can't recall
/* $rows = get_field('career_summary');
if($rows)
{
foreach($rows as $row)
{
echo '<div class="biomid">';
echo '<div class="one-third">';
echo '<div><b>'.$row['year'].'</b></div>';
echo '</div>';
echo '<div class="one-third">';
echo '<div>'.$row['position'].'</div>';
echo '</div>';
echo '<div class="one-third">';
echo '<div>'.$row['description'].'</div>';
echo '</div>';
echo '<div class="clear"></div>';
echo '</div>';
}
}
*/
echo '</div>';
echo '</div>';
}
remove_action('genesis_before_post_content', 'genesis_post_info');
genesis();
?>
@pmgllc
Copy link

pmgllc commented Oct 10, 2014

All of the data is there, yes.

@pmgllc
Copy link

pmgllc commented Oct 10, 2014

This https://gist.github.com/pmgllc/cfc68efe39f6fca8a48b doesn't return a value for $summary_year

The dump from your code does show a ton of fields. Quality and Summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment