[wp-trac] [WordPress Trac] #12385: post type and page name problems

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 26 08:49:58 UTC 2010


#12385: post type and page name problems
-----------------------------+----------------------------------------------
 Reporter:  danielpataki     |       Owner:            
     Type:  feature request  |      Status:  new       
 Priority:  normal           |   Milestone:  Unassigned
Component:  General          |     Version:            
 Severity:  normal           |    Keywords:            
-----------------------------+----------------------------------------------
 Hello! I'm not sure this is a problem, it's more a case of bad usage
 practices on my end, but perhaps something that count be addressed.

 I'm using post_types to create sections on a blog. For example, you could
 create a Yahoo Answers type forum by creating a post type named
 "questions". I named it in the plural because I want to have a nice
 permalink style, so I created a page named "questions" and some sub-pages
 like "most-recent", "most-commented".

 In this case however, the template pages used by wordpress are a bit mixed
 up. page.php is used to display the main section page, which is
 blogurl.com/questions/ , single.php is used to show a question single
 post, blogurl.com/questions/the-title-here, but for subpages, index.php is
 used, while it should be page.php.

 I did not check how the function works, but I am guessing that since there
 is a post_type named "questions", wordpress assumes that "most-viewed" is
 a post as well. When it doesn't find it, it falls back on index.php.

 Again, I think this is probably not good practice, I'm just bringing this
 to attention so maybe I can help a bit.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12385>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list