Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Created January 7, 2012 12:01

Revisions

  1. deckerweb revised this gist Apr 24, 2012. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.aw
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    <?php

    add_filter( 'wpspn_next_post_link', 'custom_wpspn_next_link' );
    /**
    * WP Single Post Navigation: Add custom filters for "next post link"
  2. deckerweb revised this gist Jan 7, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.aw
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ function custom_wpspn_next_link() {
    'format' => '%link', // Change link format
    'link' => '&laquo;', // Change link string
    'in_same_cat' => FALSE, // Apply only to same category (default: FALSE)
    'excluded_categories' => '' // Exclude categories (defaul: empty)
    'excluded_categories' => '' // Exclude categories (default: empty)
    );

    next_post_link( $args['format'], $args['link'], $args['in_same_cat'], $args['excluded_categories'] );
  3. deckerweb created this gist Jan 7, 2012.
    15 changes: 15 additions & 0 deletions gistfile1.aw
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    add_filter( 'wpspn_next_post_link', 'custom_wpspn_next_link' );
    /**
    * WP Single Post Navigation: Add custom filters for "next post link"
    */
    function custom_wpspn_next_link() {

    $args = array (
    'format' => '%link', // Change link format
    'link' => '&laquo;', // Change link string
    'in_same_cat' => FALSE, // Apply only to same category (default: FALSE)
    'excluded_categories' => '' // Exclude categories (defaul: empty)
    );

    next_post_link( $args['format'], $args['link'], $args['in_same_cat'], $args['excluded_categories'] );
    }