[wp-hackers] Showing custom page types

Jennifer Hodgdon yahgrp at poplarware.com
Fri Jan 30 01:58:55 GMT 2009


Chris Jean wrote:
> I don't like the idea of shortcutting the WordPress system by directly 
> calling the template file directly and exiting. 

I don't see why not. WP basically does the same thing, after the 
template_redirect action happens -- if none of the template_redirect 
actions has taken charge of the situation and done its own thing, WP 
basically figures out which template to use, includes that template, 
and exits. Right?

> I always like to work with the system rather than breaking through the 
> system if possible. My desire to learn the "right way" to do this was 
> the reason for sending the original message.

I think this is the "right" way to do what you are trying to do in WP. 
There is no better way that I am aware of (and I can think of some 
worse ways). The template_redirect action was added to WP for this 
exact purpose.

<soapbox>As Mike noted earlier in this thread, Drupal does URL 
redirection to modules better. But there's a reason for that: WP is 
meant to be a blogging platform, while Drupal is meant to be a custom 
web application platform. That is why Drupal has better ways to handle 
modules having their own URLs -- you absolutely need that in a custom 
application platform. You don't need that in a blogging platform. On 
the other hand, if you just want to do blogging, WP has all you need 
and it is a LOT easier to dive into. Right tool for the right job, 
etc. etc. </soapbox>

    --Jennifer

-- 
Jennifer Hodgdon * Poplar ProductivityWare
www.poplarware.com

Drupal/WordPress Sites, Themes, Modules/Plugins
Custom Web Programming, Web Databases
PHP, Perl, MySQL, JavaScript, XML, AJAX



More information about the wp-hackers mailing list