Skip to content

Instantly share code, notes, and snippets.

@csknk
Last active December 27, 2015 13:49
Show Gist options
  • Select an option

  • Save csknk/7335868 to your computer and use it in GitHub Desktop.

Select an option

Save csknk/7335868 to your computer and use it in GitHub Desktop.
Next and Previous Projects function attached to a Thesis 2.1 hook
/**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', '&laquo View the Previous Project', TRUE);?></div><?php
?><div class="half_right"><?php echo next_post_link('%link', 'View the Next Project &raquo', TRUE);?></div><?php
// Next two lines link to next/previous project CPT without category filter
?><div class ="half"><?php echo previous_post_link('%link', '&laquo View Previous Project');?></div><?php
?><div class="half_right"><?php echo next_post_link('%link', 'View Next Project &raquo');?></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