Guest User

Untitled

a guest
Jan 20th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. function get_next_prev_posts() {
  2. if (!$this->is_single) {
  3. return '';
  4. }
  5.  
  6. if (td_util::get_option('tds_show_next_prev') == 'hide') {
  7. return '';
  8. }
  9.  
  10. $buffy = '';
  11.  
  12. $next_post = get_next_post();
  13. $prev_post = get_previous_post();
  14.  
  15. if (!empty($next_post) or !empty($prev_post)) {
  16. $buffy .= '<div class="td-block-row td-post-next-prev">';
  17. if (!empty($prev_post)) {
  18. $buffy .= '<div class="td-block-span6 td-post-prev-post">';
  19. $buffy .= '<div class="td-post-next-prev-content"><span>' .__td('<div class="customprev"> Previous article', TD_THEME_NAME) . '</span>';
  20. $buffy .= '</div>';
  21. $buffy .= '<a href="' . esc_url(get_permalink($prev_post->ID)) . '">' . get_the_title( $prev_post->ID ) . '</a>';
  22. $buffy .= '</div>';
  23. $buffy .= '</div>';
  24.  
  25. } else {
  26. $buffy .= '<div class="td-block-span6 td-post-prev-post">';
  27. $buffy .= '</div>';
  28. }
  29. $buffy .= '<div class="td-next-prev-separator"></div>';
  30. if (!empty($next_post)) {
  31. $buffy .= '<div class="td-block-span6 td-post-next-post">';
  32. $buffy .= '<div class="td-post-next-prev-content"><span>' .__td('<div class="customnext"> Next article', TD_THEME_NAME) . '</span>';
  33. $buffy .= '</div>';
  34. $buffy .= '<a href="' . esc_url(get_permalink($next_post->ID)) . '">' . get_the_title( $next_post->ID ) . '</a>';
  35. $buffy .= '</div>';
  36. $buffy .= '</div>';
  37.  
  38. }
  39. $buffy .= '</div>'; //end fluid row
  40. }
  41.  
  42. return $buffy;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment