Skip to content

Instantly share code, notes, and snippets.

Last active October 12, 2015 14:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save joehoyle/4040320 to your computer and use it in GitHub Desktop.
regex // the regex pattern to match against the URL
query // the wp_query arguments
template // the template file to load for this rewrite, full path or relative to active theme
request_callback // callback called when the url is matched, useful for adding complex wp_query arguments
disable_canonical // if set to true, will disable the often pesky canonical redirect that can erosion sly run on complex queries
post_query_properties // list of properties to add / overwrite on the WP_Query object, useful for setting is_my_custom_page=1 style properties.
title_callback // called via the wp_title hook to easily set the page title
restrict_access // can be set to "logged_in_only" etc for private pages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment