How Can I Fix This Code So The Next/Previous Buttons Show Posts From Same "Tag"?
-
function get_next_prev_posts() { if (!$this->is_single) { return ''; } if (td_util::get_option('tds_show_next_prev') == 'hide') { return ''; } $buffy = ''; $next_post = get_next_post(); $prev_post = get_previous_post(); if (!empty($next_post) or !empty($prev_post)) { $buffy .= '<div class="td-block-row td-post-next-prev">'; if (!empty($prev_post)) { $buffy .= '<div class="td-block-span6 td-post-prev-post">'; $buffy .= '<div class="td-post-next-prev-content"><span>' .__td('Previous article', TD_THEME_NAME) . '</span>'; $buffy .= '<a>ID)) . '">' . get_the_title( $prev_post->ID ) . '</a>'; $buffy .= '</div>'; $buffy .= '</div>'; } else { $buffy .= '<div class="td-block-span6 td-post-prev-post">'; $buffy .= '</div>'; } $buffy .= '<div class="td-next-prev-separator"></div>'; if (!empty($next_post)) { $buffy .= '<div class="td-block-span6 td-post-next-post">'; $buffy .= '<div class="td-post-next-prev-content"><span>' .__td('Next article', TD_THEME_NAME) . '</span>'; $buffy .= '<a>ID)) . '">' . get_the_title( $next_post->ID ) . '</a>'; $buffy .= '</div>'; $buffy .= '</div>'; } $buffy .= '</div>'; //end fluid row } return $buffy; }
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]
- The topic ‘How Can I Fix This Code So The Next/Previous Buttons Show Posts From Same "Tag"?’ is closed to new replies.