Skip to content

Instantly share code, notes, and snippets.

@ramseyp
Last active December 17, 2015 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramseyp/5586553 to your computer and use it in GitHub Desktop.
Save ramseyp/5586553 to your computer and use it in GitHub Desktop.
Grab a custom post type of testimonial & output it, along with a custom field for the person's credentials / title
<?php
$testimeta = get_post_custom($testimq->post->ID);
if ( $testimeta['s25_testim_cred'][0] !='' ) { $cred = ', '. $testimeta['s25_testim_cred'][0]; } else { $cred = ''; }
echo '<div class="entry-content">'. wpautop( get_the_content($testimq->post->ID), true ) .'</div>';
echo '<p class="attrib"><em>&ndash; '. get_the_title($testimq->post->ID) . $cred .'</em></p>';
echo '</div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment