WordPress.org

Support

Support » Themes and Templates » $_GET Clean URLs

$_GET Clean URLs

  • Hello there,

    My current permalink setttings are set to just: /%postname%/

    I have a custom page template that has one simple $_GET variable. I actually use this $_GET variable to assist me with querying certain posts and outputting them in XML.

    For example: http://domain.com/my-xml-page?type=someterm

    I’d like to figure out how I can possibly clean up this url as such:

    http://domain.com/my-xml-page/someterm

    The thing is, I only want this to apply this specific page template. Not all of WordPress.

    Anybody know of a solution? Thanks for your help!

Viewing 1 replies (of 1 total)
  • Start here Rewrite_API

    * Use add_rewrite_rule() and add_rewrite_tag()
    * Hook into a page load (maybe the hook template_redirect) and check to see if the current page/post uses the specific template

Viewing 1 replies (of 1 total)
  • The topic ‘$_GET Clean URLs’ is closed to new replies.
Skip to toolbar