Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created May 17, 2012 13:24
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 billerickson/2718906 to your computer and use it in GitHub Desktop.
Save billerickson/2718906 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'swas_footnote_start_number', 'be_footnotes_start' );
/**
* Footnotes Start
* @since 1.0.0
*
* When viewing "All Pages" option, ensure start number is 1
*
* @param int $number
* @return int
*/
function be_footnotes_start( $number ) {
global $multipage;
if( get_query_var('all-pages') && $multipage )
$number = 1;
return $number;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment