[wp-trac] [WordPress Trac] #19958: Allow custom post types as "home"

WordPress Trac noreply at wordpress.org
Mon Nov 19 16:36:20 UTC 2012


#19958: Allow custom post types as "home"
----------------------------+------------------------------
 Reporter:  sooskriszta     |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:  3.3.1
 Severity:  major           |  Resolution:
 Keywords:                  |
----------------------------+------------------------------
Changes (by jpyper):

 * cc: jarrod@… (added)


Comment:

 What about instead putting a filter on the arguments for the
 wp_dropdown_pages call that produces the list of pages to choose from
 (line 96 in wp-admin/options-reading.php)? A developer could then use :


 ----
 function filter_my_cpt($args) {
   $args[post_type] = 'cpt-slug';[[BR]]

   //to also maintain pages: $args[post_type] = 'pages, cpt-slug'
 }[[BR]]
 add_filter('options-front-page' , filter_my_cpt');[[BR]]
 add_filter('options-posts-page' , filter_my_cpt');
 ----

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19958#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list