Skip to content

Instantly share code, notes, and snippets.

@bhubbard
Last active August 29, 2015 14:15
Show Gist options
  • Save bhubbard/4669ee6a53fbfcce5396 to your computer and use it in GitHub Desktop.
Save bhubbard/4669ee6a53fbfcce5396 to your computer and use it in GitHub Desktop.
Templates for Testimonials by WooThemes
<?php
/* Our Template Page for the Testimonials Archive created by Testimonials by WooThemes */
get_header(); ?>
<h1><?php post_type_archive_title(); ?></h1>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php echo antispambot(get_post_meta( get_the_ID() , '_gravatar_email', true )); // Email ?>
<?php echo get_post_meta( get_the_ID() , '_byline', true ); // Job Title ?>
<?php echo get_post_meta( get_the_ID() , '_url', true ); // URL ?>
<?php echo get_the_term_list( get_the_ID() , 'testimonial-category', '<p>', ', ', '</p>' ); ?>
</div>
<?php endwhile; else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.', 'imforzaclient' ); ?></p>
<?php endif; ?>
<?php get_footer(); ?>
<?php
/* Our Template Page for Single Testimonials created by Testimonials by WooThemes */
get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
if ( get_post_meta( get_the_ID() , '_gravatar_email', true ) != '' ) {
echo 'Email: <a href="mailto:' . antispambot(get_post_meta( get_the_ID() , '_gravatar_email', true )) . '">' . antispambot(get_post_meta( get_the_ID() , '_gravatar_email', true )) . '</a>'; // Email
} else {
}
?>
<?php echo get_post_meta( get_the_ID() , '_byline', true ); // Job Title ?>
<?php
if ( get_post_meta( get_the_ID() , '_url', true ) != '' ) {
echo 'Website: <a href="' . esc_url( get_post_meta( get_the_ID() , '_url', true )) .'">' . esc_url( get_post_meta( get_the_ID() , '_url', true )) . '</a>'; // URL
} else {
}
?>
<?php echo get_the_term_list( get_the_ID() , 'testimonial-category', '<p>', ', ', '</p>' ); ?>
</div>
<?php endwhile; else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.', 'imforzaclient' ); ?></p>
<?php endif; ?>
<?php get_footer(); ?>
<?php
/* Our Template Page for the Testimonials Archive created by Testimonials by WooThemes */
get_header(); ?>
<h1 class="entry-title headline">Testimonials for <?php $term = $wp_query->queried_object; echo $term->name; ?> </h1>
<?php $term = $wp_query->queried_object; echo $term->description; ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php echo antispambot(get_post_meta( get_the_ID() , '_gravatar_email', true )); // Email ?>
<?php echo get_post_meta( get_the_ID() , '_byline', true ); // Job Title ?>
<?php echo get_post_meta( get_the_ID() , '_url', true ); // URL ?>
<?php echo get_the_term_list( get_the_ID() , 'testimonial-category', '<p>', ', ', '</p>' ); ?>
</div>
<?php endwhile; else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.', 'imforzaclient' ); ?></p>
<?php endif; ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment