Last active
December 27, 2015 13:49
-
-
Save csknk/7335868 to your computer and use it in GitHub Desktop.
Next and Previous Projects function attached to a Thesis 2.1 hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /**Next & previous project links**/ | |
| function add_next_project() { | |
| // Next two lines link to project custom post types in same category | |
| ?><div class ="half"><?php echo previous_post_link('%link', '« View the Previous Project', TRUE);?></div><?php | |
| ?><div class="half_right"><?php echo next_post_link('%link', 'View the Next Project »', TRUE);?></div><?php | |
| // Next two lines link to next/previous project CPT without category filter | |
| ?><div class ="half"><?php echo previous_post_link('%link', '« View Previous Project');?></div><?php | |
| ?><div class="half_right"><?php echo next_post_link('%link', 'View Next Project »');?></div><?php | |
| } | |
| add_action('hook_bottom_next_in_cat', 'add_next_project'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment