[wp-hackers] Best format for regularly updated data

Mike Schinkel mikeschinkel at newclarity.net
Wed Jul 28 17:00:40 UTC 2010


Where do I begin? :-)

With custom post types for Courses over Pages you get ability to:

1. Query for Courses only using WP_Query("post_type=course").
2. Have a Course-specific template in your theme, i.e. single-course.php.
3. Have a Course-specific admin edit page with Course-specific metaboxes.
4. Have Course-specific taxonomy terms that only apply to Courses.
5. Get a Course-specific URLs, i.e. http://example.com/courses/{course-name}/

They are probably more reasons but these are 5 that come to mind (anyone else know of others?) Worthwhile for your use-cases?

-Mike    

On Jul 28, 2010, at 6:34 AM, "Dan Smart" <dan at dansmart.co.uk> wrote:

> Ok to do that I'll have to maintain a cross-referenced list of courses to
> post ids, and add new courses / delete them where necessary, but that sounds
> maintainable.
> 
> Why do you specifically recommend Custom Post ids in this situation, rather
> than Pages containing course information? Is it because it's easier to just
> display courses with their information more appropriately, or another
> reason?
> 
> Thanks,
> 
> Dan
> 
> ----------------------------------------------------------------------------
> ---------
> Dan Smart - Freelance Web Developer
> Web: www.dansmart.co.uk
> Follow me at: www.twitter.com/danielsmart
> 
> 
> -----Original Message-----
> From: wp-hackers-bounces at lists.automattic.com
> [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Mike Schinkel
> Sent: 28 July 2010 08:47
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] Best format for regularly updated data
> 
> On Jul 28, 2010, at 3:36 AM, Dan Smart wrote:
>> 1) The plugin imports to a db table of its own, and displays the 'pages'
>> itself, managing the rewrite rules to display the appropriate content.
>> 
>> 2) On the import of data, create new Wordpress Pages each time, and track
>> and delete the old ones (they will no longer be needed). Are there any
>> downsides to this regular turnover of pages?
> 
> Why can't you use option #3, update the existing pages?  (actually, you'd
> almost certainly want to use custom post types instead of pages.)
> 
> -Mike
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list