Advertisement
jrevillini

around line 104, class-xydac-post-type-functions.php,UCMS0.2

May 8th, 2012
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. <?php
  2.  
  3.     // around line 104, class-xydac-post-type-functions.php, UCMS 0.2
  4.     function xydac_posts_home( $query ) {
  5.       if ( !is_preview() && !is_admin() && !is_singular() && !is_404() ) {
  6.         $args = array(
  7.           'public' => true ,
  8.           '_builtin' => false
  9.         );
  10.         $post_types = get_post_types( $args );
  11.         // ORIGINAL:
  12.             //$post_types = array_merge( $post_types , array( 'post' ) );
  13.         // JR HACK:
  14.             $post_types = array_merge( $post_types , array( 'post', 'page' ) );
  15.         $my_post_type = get_query_var( 'post_type' );
  16.         if ( empty( $my_post_type ) )
  17.             $query->set( 'post_type' , $post_types );
  18.       }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement