Skip to content

Instantly share code, notes, and snippets.

@danielck
Created March 23, 2013 01:23
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 danielck/5225955 to your computer and use it in GitHub Desktop.
Save danielck/5225955 to your computer and use it in GitHub Desktop.
<?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