Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Created January 8, 2012 17:05
Show Gist options
  • Save deckerweb/1579012 to your computer and use it in GitHub Desktop.
Save deckerweb/1579012 to your computer and use it in GitHub Desktop.
WP Single Post Navigation - functions.php code for changing link direction - copy all and place in your functions.php of theme or child theme - you can place the full code at the beginning AFTER the opening "<?php" line - it will do no harm!
<?php
/**
* WP Single Post Navigation: Reverse link direction
*/
define( 'WPSPN_REVERSE_LINK_DIRECTION', 'reverse_direction' );
/**
* For other snippets see this Gist:
* @link https://gist.github.com/2961493
*/
@GaryJones
Copy link

Why not build this into the plugin, and just have the user add:

define( 'WPSPN_REVERSE_DIRECTION', true );

in their functions.php if they want it?

@deckerweb
Copy link
Author

In some way it's already implemented - users could apply only the constant code block for change browsing direction -- the other 2 function blocks are for customizing the parameters -- when changing direction the reverse of the arrows should also applied so it will then be the full code block like above.

Any suggestion on implementation?

Thanx, Dave :)

@deckerweb
Copy link
Author

Hi Gary,

I just implemented your suggestion in v1.5 - just released:

define( 'WPSPN_REVERSE_DIRECTION', true );

This will change link AND arrow direction all in once.

-Dave :)

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