Unlock your potential with a Pro Membership
Here is where you propel your career forward. Come join us today. Learn more.
Customize the Previous and Next
Lab: The Loop Part 2 – Developer’s Guide to Customizing Genesis
Video Runtime: 06:25
Now you know how to turn on the previous and next links. In this episode, you will be customizing it by changing the previous link text, adding a class attribute, and moving the post title to another line. Here is the code you will build and I will explain in this episode:
//return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post, $adjacent ); | |
add_filter( 'previous_post_link', 'genesis_sample_change_previous_link_html', 10, 5 ); | |
function genesis_sample_change_previous_link_html( $html, $format, $link, $post, $adjacent ) { | |
d( $html ); | |
$html = str_replace( '>«', 'class="button" >« Previous<br>', $html ); | |
d( $html ); | |
return $html; | |
} |
Hey... hey you... yes you!... Having a good time? Learning new things? Good!
Episodes
Total Lab Runtime: 02:28:53
- 1 Before Entry Content Hook - genesis_before_entry_contentpro 07:13
- 2 Entry Content Overviewpro 05:49
- 3 Entry Content - Post Imagepro 10:43
- 4 Real Refactoring Examplefree 10:46
- 5 Entry Content - Post Contentpro 12:16
- 6 Entry Content - Post Content Navigationpro 13:31
- 7 Entry Content - Post Permalinkpro 09:35
- 8 After Entry Contentpro 04:16
- 9 Entry Footer - Overviewpro 07:14
- 10 Entry Footer - Post Metapro 14:07
- 11 After Entry - Overviewpro 06:01
- 12 Reorder Author Box & After Entry Widget Areafree 08:25
- 13 After Entry Widget Areapro 11:30
- 14 Turning on the Adjacent Entry Nav - Previous and Nextpro 10:09
- 15 Customize the Previous and Nextpro 06:25
- 16 After the Loop - Archive Posts Navigationpro 07:26
- 17 The Loop Else - No Posts Foundpro 01:31
- 18 Wrap it Upfree 01:56