Changeset 3213568
- Timestamp:
- 12/26/2024 11:07:38 PM (14 months ago)
- File:
-
- 1 edited
-
tradejournal/trunk/includes/template-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tradejournal/trunk/includes/template-functions.php
r3196002 r3213568 86 86 $content .= '<p>No trades found for this day.</p>'; 87 87 } 88 89 // Add Previous and Next post navigation 90 $prev_post = get_previous_post(); 91 $next_post = get_next_post(); 92 93 $navigation = '<div class="tjwp-post-navigation">'; 94 if (!empty($prev_post)) { 95 $navigation .= '<div class="nav-previous"><a href="' . get_permalink($prev_post->ID) . '">« Previous: ' . esc_html(get_the_title($prev_post->ID)) . '</a></div>'; 96 } 97 if (!empty($next_post)) { 98 $navigation .= '<div class="nav-next"><a href="' . get_permalink($next_post->ID) . '">Next: ' . esc_html(get_the_title($next_post->ID)) . ' »</a></div>'; 99 } 100 $navigation .= '</div>'; 101 102 $content .= $navigation; 88 103 } 89 104
Note: See TracChangeset
for help on using the changeset viewer.