Skip to content

Instantly share code, notes, and snippets.

@erezLieberman
Last active August 29, 2015 13:56
Show Gist options
  • Save erezLieberman/9255343 to your computer and use it in GitHub Desktop.
Save erezLieberman/9255343 to your computer and use it in GitHub Desktop.
Next/Previous Post Link Plus
//Next/Previous Post Link Plus marksup withe botstrapp 3
<div class="row postNav">
<div class="pull-right col-md-4 col-sm-4 col-xs-4" style="text-align:right">
<?php previous_post_link_plus(array('order_by' => 'post_title','loop' => true,'format' => '&laquo; %link','link' => 'פוסט הקודם') ); ?></div>
<div class="col-md-4 col-sm-4 col-xs-4" style="text-align:center"><a href="<?php echo get_permalink( 10 ); ?>">בחזרה לבלוג</a></div>
<div class="pull-left col-md-4 col-sm-4 col-xs-4" style="text-align:left">
<?php next_post_link_plus(array('order_by' => 'post_title','loop' => true,'format' => '%link &raquo;','link' => 'פוסט הבא') ); ?></div>
</div>
//go Through posts that just in current term
<?php $terms = get_the_terms( $post->ID , 'ProjectCategories' );
if($terms) {
foreach( $terms as $term ) {
$currTerm = $term->term_id;
}
}
?>
<div class="pull-left hidden-xs">
<div class="rsSlideCount hidden-sm"></div>
<div><?php previous_post_link_plus( array('order_by' => 'menu_order','loop' => true,'link' => '<< לפרויקט הקודם','format' => '%link','in_cats' => ''.$currTerm)); ?></div>
<div><a href="<?php echo get_permalink( 19 ); ?>">לכל הפרויקטים</a></div>
<div><?php next_post_link_plus( array('order_by' => 'menu_order','loop' => true,'link' => 'לפרויקט הבא >>','format' => '%link','in_cats' => ''.$currTerm)); ?></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment