Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Created June 20, 2012 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deckerweb/2961493 to your computer and use it in GitHub Desktop.
Save deckerweb/2961493 to your computer and use it in GitHub Desktop.
WP Single Post Navigation -- constants and filters for customizing and branding
<?php
// since plugin version v1.5:
// Constants:
/**
* WP Single Post Navigation: Reverse link direction
*/
define( 'WPSPN_REVERSE_LINK_DIRECTION', TRUE );
// Filters:
/**
* Customize previous post link:
* @link https://gist.github.com/1574571
*/
/**
* Customize next post link:
* @link https://gist.github.com/1574576
*/
add_filter( 'wpspn_filter_previous_post_tooltip', 'custom_wpspn_previous_post_tooltip_output' );
/** WP Single Post Navigation: Custom Previous Tooltip Output */
function custom_wpspn_previous_post_tooltip_output() {
return __( 'Custom previous post:', 'your-text-domain' );
}
add_filter( 'wpspn_filter_next_post_tooltip', 'custom_wpspn_next_post_tooltip_output' );
/** WP Single Post Navigation: Custom Next Tooltip Output */
function custom_wpspn_next_post_tooltip_output() {
return __( 'Custom next post:', 'your-text-domain' );
}
@deckerweb
Copy link
Author

Note: The above codes work with plugin version 1.5 or higher!

Extended explanation can be found at the plugin's page "FAQ" section at the bottom:
http://wordpress.org/extend/plugins/wp-single-post-navigation/faq/

Download "WP Single Post Navigation" plugin at wordpress.org:
http://wordpress.org/extend/plugins/wp-single-post-navigation/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment