Created
March 23, 2013 01:23
-
-
Save danielck/5225955 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add a new /part/ endpoint. Access the value of part by | |
* using get_query_var( 'part' ) in a theme template. | |
*/ | |
add_filter( 'init', 'h1ep_add_rules' ); | |
function h1ep_add_rules() { | |
// this will register the endpoint for all WordPress URLs | |
add_rewrite_endpoint( 'part', EP_ALL ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment