forked from rotarytheme/rotary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
loop-archive-projects.php
35 lines (31 loc) · 950 Bytes
/
loop-archive-projects.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* The loop for the project connected posts archive
*
* @package WordPress
* @subpackage Rotary
* @since Rotary 1.0
*/
?>
<?php if ( isset( $_REQUEST['projectid'] ) ) : ?>
<?php //secondary loop to get connected posts
$postCount = 0;
$clearLeft='';
$connected = new WP_Query( array(
'connected_type' => 'projects_to_posts',
'connected_items' => $_REQUEST['projectid'],
'nopaging' => false,
) ); ?>
<?php if ( $connected->have_posts() ) : ?>
<?php $committeePost = get_post( $_REQUEST['committeeid'] ); ?>
<?php while ( $connected->have_posts() ) : $connected->the_post();?>
<?php $postCount = rotary_output_blogroll($postCount, $clearLeft); ?>
<?php endwhile;?>
<?php else : ?>
<p>No posts found.</p>
<?php endif; ?>
<?php // Reset Post Data ?>
<?php wp_reset_postdata(); ?>
<?php else : ?>
<p>This page is only valid from the committee.</p>
<?php endif;