While in other messages in this forum say that “pages don’t have categories,” that’s not quite accurate.
In my testing (WP 2.0.7), a page is assigned the category that is the default for posts at the time it is created.
This appears to make a difference for plugins like Category Access, http://www.coppit.org/code/, and in other cotexts where pages are displayed along with posts (i.e. in the results of some searches) and so have their category listed.
It took me awhile to confirm that code like
would work just fine on pages. Can anyone point me to documentation on those post properties (and any notes about the difference in using them for pages)? [Apologies if I’m asking for something that’s so obvious in the code, it hasn’t made it to the codex or if my codex searches have been poor.]
- The topic ‘How to change a page category’ is closed to new replies.