[wp-hackers] Page Enhancements

Ryan Boren ryan at boren.nu
Wed Oct 6 06:48:17 UTC 2004


This has finally been given some love.  Notable new things are "Page
Parent" and "Page Template".  Page Parent allows you to arrange pages
into hierarchies.  If you create an "About" page with a Page Parent of
"Main Page", the URI for About will be "/about/".  If you create a "Me"
page with a Page Parent of "About", the URI for Me will be "/about/me/".
The old "/site/page-name/" URIs will be going away. They were just place
holders until the real deal came along.

WP creates a rewrite rule for each page.  If you are using htaccess and
mod_rewrite, your htaccess will be automatically updated if it is
writable.

"Page Template" allows you to specify the template to use when loading
the page.  Page templates are placed in the theme directory and have a
special "Template Name:" header.  This will come in handy for those who
like to create a special archives.php (narchives.php) page.  Create a
page called "Archives" and choose archives.php as its template.
Whenever you visit "/archives/", your archives page will be loaded.
This will make it easier to run Nicer Archives, for example.  It also
allows your "About" page to have its own unique style, if you so choose.
I'll be supplying a new "Kubrick for 1.3" theme that includes
archives.php and links.php page templates so that we can play.

If you've got a 1.3 alpha sandbox, give it a twirl.  Remember to run
upgrade.php.

This is still under development.  The usual disclaimers about unfinished
alpha code apply.

Ryan






More information about the hackers mailing list