Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template Name: Projects
- *
- * Selectable from a dropdown menu on the edit page screen.
- */
- ?>
- <?php get_header(); ?>
- <div id="primary">
- <div id="content" role="main">
- <?php $loop = new WP_Query( array( 'post_type' => 'project', 'posts_per_page' => -1) ) ?>
- <?php if ( get_the_ID() == 618 ) { ?> <!-- start if -->
- <div id = "pageTitle">Projects</div>
- <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
- <hr>
- <div id="memName">
- <?php $proj_title = get_the_title() ?>
- <?php $custurl = get_permalink() ?>
- <?php echo ('<a href ="' . $custurl . '">' . $proj_title . '</a>') ?>
- </div>
- <div><?php echo get_post_meta($post->ID, 'wpcf-project-description', true) ?></div>
- <?php endwhile ?>
- <hr>
- <?php } else { ?> <!-- end if, start else -->
- <?php $curlink = get_permalink() ?>
- <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
- <?php if ( $curlink == get_permalink() ) { ?> <!-- start if -->
- <div class="entry-content">
- <div id="memName">
- <?php echo get_post_meta($post->ID, 'wpcf-project-title', true) ?>
- </div>
- <hr>
- <strong class="memlabel">Status: </strong>
- <?php echo get_post_meta($post->ID, 'wpcf-project-status', true) ?>
- <?php $zotcol=get_post_meta($post->ID, 'wpcf-project-collection', true) ?>
- <?php if (empty($zotcol)) {
- $zotcol = 1; } ?>
- <div class="bibliography">
- <div id="reltit">Related Publications</div>
- <?php echo do_shortcode( '[zotpress collection="' . $zotcol . '" download="yes"]' ) ?>
- </div>
- <?php the_content() ?>
- </div>
- <?php } ?> <!-- end if -->
- <?php endwhile ?>
- <?php } ?>
- </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement