Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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('<div class="customprev"> Previous article', TD_THEME_NAME) . '</span>';
- $buffy .= '</div>';
- $buffy .= '<a href="' . esc_url(get_permalink($prev_post->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('<div class="customnext"> Next article', TD_THEME_NAME) . '</span>';
- $buffy .= '</div>';
- $buffy .= '<a href="' . esc_url(get_permalink($next_post->ID)) . '">' . get_the_title( $next_post->ID ) . '</a>';
- $buffy .= '</div>';
- $buffy .= '</div>';
- }
- $buffy .= '</div>'; //end fluid row
- }
- return $buffy;
- }
Advertisement
Add Comment
Please, Sign In to add comment