Created
May 10, 2013 13:51
-
-
Save vicchi/5554526 to your computer and use it in GitHub Desktop.
Using WP Biographia template tags within a custom Loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name Posts: Desktops | |
*/ | |
get_header(); | |
?> | |
<!--sub head container--> | |
<div id="subhead_container"> | |
<div id="subhead"> | |
<h1><?php the_title(); ?></h1> | |
</div> | |
</div> | |
<div id="container"> | |
<div id="content" role="main"> | |
<div id="left-col"> | |
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> | |
<div class="post-entry"> | |
<div class="meta-data"> | |
<div class="category_icon"> | |
<?php the_category(', '); ?> | |
</div> | |
<div class="comment_icon"> | |
<?php comments_popup_link( __( 'Leave a comment', 'Rbox' ), __( '1 Comment', 'Rbox' ), __( '% Comments', 'Rbox' ) ); ?> | |
</div> | |
</div> <!-- meta-data end --> | |
<div class="clear"></div> | |
<?php the_content(); ?> | |
<div class="clear"></div> | |
<?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'Rbox' ), 'after' => '' ) ); ?> | |
<?php the_tags('Social tagging: ',' > '); ?> | |
</div> <!-- post-entry end --> | |
<?php | |
$cat_id = get_cat_ID('journal'); | |
$args = array( | |
'cat' => $cat_id, | |
'post_type' => 'post', | |
'post_status' => 'publish', | |
'posts_per_page' => -1, | |
'ignore_sticky_posts' => 1 | |
); | |
$query = new WP_Query($args); | |
if ($query->have_posts()): | |
?> | |
<form name="jump"> | |
<select name="menu"> | |
<?php while ($query->have_posts()) : $query->the_post(); ?> | |
<option value="<?php the_permalink() ?>"><?php the_title(); ?></option> <?php endwhile; ?> | |
</select> | |
<input type="button" onClick="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="Go"> | |
</form> | |
<?php | |
endif; | |
wp_reset_postdata(); | |
if (function_exists('wpb_the_biography_box')) { | |
$user = get_user_by('id', $post->post_author); | |
wpb_the_biography_box('raw', $user->user_login); | |
} | |
comments_template('', true); | |
?> | |
<?php endwhile; ?> <!-- default loop end --> | |
</div> <!--left-col end--> | |
</div> <!-- content end --> | |
</div> <!-- container end --> | |
<?php get_sidebar(); ?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment