This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

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

By: jrevillini on May 8th, 2012  |  syntax: PHP  |  size: 0.60 KB  |  views: 46  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.         }
clone this paste RAW Paste Data