Advertisement
bennyp

Untitled

Dec 10th, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.01 KB | None | 0 0
  1. <?php
  2.  
  3. // make homepage posts feed populate only from time.ly calendar events, ignoring posts.
  4. unset($portfolio_args['ai1ec_events']);
  5.  
  6. function custom_conference_in_home_loop( $query ) {
  7.  if ( is_home() && $query->is_main_query() )
  8.  $query->set( 'post_type', 'ai1ec_event' );
  9.  $query->query_vars[‘orderby’] = 'start';
  10.  return $query;
  11.  }
  12.  
  13.  add_filter( 'pre_get_posts', 'custom_conference_in_home_loop' );
  14.  
  15. function namespace_add_custom_types( $query ) {
  16.   if( is_home() && !empty( $query->query_vars['suppress_filters'] ) ) {
  17.     $query->set( 'post_type',  'ai1ec_event' );
  18.     $query->query_vars[‘orderby’] = 'start';
  19.       return $query;
  20.     }
  21. }
  22. add_filter( 'pre_get_posts', 'namespace_add_custom_types' );
  23.  
  24. // Change "View More Blog Posts" button to "View More Programs"
  25.  
  26. function change_blogbutton_text( $button_text ) {
  27.     if ( $button_text == 'View More Blog Posts' ) {
  28.         $button_text = 'View More Programs';
  29.     }
  30.     return $button_text;
  31. }
  32. add_filter( 'gettext', 'change_blogbutton_text', 20 );
  33.  
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement