Request: custom post behaviours (or failing that – ability to force is_page)
[Note: cross posted to “What Should 2011 Hold for WordPress?”]
Using WP3.1RC-1 I’ve found custom post types to be far more limited in application than they need be.
For example, there is as far as I can see no way to change the way a custom post type is treated from ‘like a post’ to ‘like a page’ unless you edit the theme. But since plugins are how you build new apps with this powerful new feature, it is severely limiting their usefulness and ease of application, if every such plugin has to have the website’s theme tailored for it to work effectively.
An example customisation would be for is_page() to be something that can be altered for a custom post type.
Ideally WP would have a set of behaviours defined, each aligned to the standard types (post, page, archive etc.) and for the custom post type to be able to say: “treat me as if I am /like/ type y”. So themes render me as if I am y, even though I am type x, and no theme has ever head of type x.
A natural extension of this will be the ability to define custom behaviours (perhaps a better term would be “display pattern”?), in which case a theme can be written to do something particularly bespoke for this new kind of data object.
P.S. In the mean time, if anyone knows how to make a custom post type appear to a theme as if it were a page rather than a post PLEASE let me know! Its a major handicap to plugin writers until this can be done.
- The topic ‘Request: custom post behaviours (or failing that – ability to force is_page)’ is closed to new replies.