Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <article>
- <aside>
- <div class="col_2 last aside">
- <?php if ( get_post_meta($post->ID, 'Benefit summary', true) ) {
- echo '<p class="benefitsummary">';
- $values = get_post_custom_values("Benefit summary"); echo $values[0];
- echo '</p>';
- } ?>
- <?php
- //for use in the loop, list 3 post titles related to first tag on current post
- $tags = wp_get_post_tags($post->ID);
- if ($tags) {
- $first_tag = $tags[0]->term_id;
- $args=array(
- 'tag__in' => array($first_tag),
- 'post__not_in' => array($post->ID),
- 'post_type' => 'resources',
- 'resourcetype' => 'white-paper',
- 'showposts'=>1,
- 'caller_get_posts'=>1
- );
- $my_query = new WP_Query($args);
- if( $my_query->have_posts() ) {
- while ($my_query->have_posts()) : $my_query->the_post(); ?>
- <p class="typetitle">White Paper</a></p>
- <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Link to <?php the_title_attribute(); ?>"><?php the_title(); ?> »</a></p>
- <?php endwhile;
- }
- wp_reset_query(); // Restore global post data stomped by the_post().
- }
- ?>
- <?php
- $tags = wp_get_post_tags($post->ID);
- $taglist = '';
- if ($tags) {
- foreach ($tags as $tag) {
- $taglist .= $tag->term_id . ',';
- }
- $args=array(
- 'tag__in' => array($first_tag),
- 'post__not_in' => array($post->ID),
- 'post_type' => 'resources',
- 'resourcetype' => 'case-study',
- 'showposts'=>1,
- 'caller_get_posts'=>1
- );
- $my_query = new WP_Query($args);
- if( $my_query->have_posts() ) {
- while ($my_query->have_posts()) : $my_query->the_post(); ?>
- <p class="typetitle">Case Study</a></p>
- <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Link to <?php the_title_attribute(); ?>"><?php the_title(); ?> »</a></p>
- <?php endwhile;
- }
- wp_reset_query(); // Restore global post data stomped by the_post().
- }
- ?>
- </div>
- </aside>
- </article>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement