Changeset 3478
- Timestamp:
- 06/19/2016 09:50:03 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/handbook.php
r3236 r3478 212 212 if ( $query->is_main_query() && ! $query->is_admin && ! $query->is_search && $query->is_post_type_archive( $this->post_type ) ) { 213 213 // If the post type has a page to act as an archive index page, get that. 214 if ( $page = get_page_by_path( $this->post_type, OBJECT, $this->post_type ) ) { 214 $page = get_page_by_path( $this->post_type, OBJECT, $this->post_type ); 215 if ( ! $page ) { 216 $slug = substr( $this->post_type, 0, -9 ); 217 $page = get_page_by_path( $slug, OBJECT, $this->post_type ); 218 } 219 if ( $page ) { 215 220 $query->set( 'p', $page->ID ); 216 221 }
Note: See TracChangeset
for help on using the changeset viewer.