コード例 #1
0
ファイル: post-series.php プロジェクト: iq007/MadScape
 /**
  * Alter next/previous post links same_cat taxonomy
  *
  * @since 2.0.0
  */
 public static function next_prev_same_cat_taxonomy($taxonomy)
 {
     if (wpex_is_post_in_series()) {
         $taxonomy = 'post_series';
     }
     return $taxonomy;
 }
コード例 #2
0
if ($same_cat) {
    $taxonomy = wpex_get_post_type_cat_tax();
    $taxonomy = apply_filters('wpex_next_prev_same_cat_taxonomy', $taxonomy);
} else {
    $taxonomy = '';
}
// Exclude terms
$excluded_terms = '';
// Previous post link title
$prev_post_link_title = '<span class="fa fa-angle-double-left"></span>%title';
$prev_post_link_title = apply_filters('wpex_prev_post_link_title', $prev_post_link_title);
// Next post link title
$next_post_link_title = '%title<span class="fa fa-angle-double-right"></span>';
$next_post_link_title = apply_filters('wpex_next_post_link_title', $next_post_link_title);
// Get post links
if ($has_terms || wpex_is_post_in_series()) {
    $prev_link = get_previous_post_link('%link', $prev_post_link_title, $same_cat, $excluded_terms, $taxonomy);
    $next_link = get_next_post_link('%link', $next_post_link_title, $same_cat, $excluded_terms, $taxonomy);
} else {
    $prev_link = get_previous_post_link('%link', $prev_post_link_title, false);
    $next_link = get_next_post_link('%link', $next_post_link_title, false);
}
?>

<?php 
if ($prev_link || $next_link) {
    ?>

    <div class="post-pagination-wrap clr">

        <ul class="post-pagination container clr">