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="wpb_row row-fluid next-prev">';
- if (!empty($prev_post)) {
- $buffy .= '<a href="' . get_permalink($prev_post->ID) . '">';
- $buffy .= '<div class="span6 prev-post">';
- $buffy .= '<div><img width="6" class="td-retina" src="' . get_template_directory_uri() .
- '/images/icons/similar-left.png" alt=""/>' . __td('Previous article', TD_THEME_NAME) . '</div>';
- $buffy .= '</div>';
- $buffy .= '</a>';
- } else {
- $buffy .= '<div class="span6 prev-post">';
- $buffy .= '</div>';
- }
- if (!empty($next_post)) {
- $buffy .= '<a href="' . get_permalink($next_post->ID) . '">';
- $buffy .= '<div class="span6 next-post">';
- $buffy .= '<div>' . __td('Next article', TD_THEME_NAME) . '<img width="6" class="td-retina" src="' .
- get_template_directory_uri() . '/images/icons/similar-right.png" alt=""/></div>';
- $buffy .= '</div>';
- $buffy .= '</a>';
- }
- $buffy .= '</div>'; //end fluid row
- }
- return $buffy;
- }
Advertisement
Add Comment
Please, Sign In to add comment