I’m assuming for the events page you’re using pre_get_posts
. The same principle will apply (check $query->is_main_query()
and eventorganiser_is_event_query( $query )
if return true) except that the page you’ll want to check is is_tax('event-category')
( see http://codex.wordpress.org/Function_Reference/is_tax ). You can specify ‘special-events’ as the term if you want to change the events per page specifically for special events.
the changes im making to functions.php is causing the site to break… so im guessing i just add this but with a slight change as you mantion above… can you edit this and let me know exactly what to copy/paste at the bottom of my functions.php?
add_action( 'pre_get_posts', 'cindy_show_all_events' );
function cindy_show_all_events( $query ){
if( $query->is_main_query() && 'event' == $query->get( 'post_type' ) ){
$query->set( 'posts_per_page', 150 );
}
}
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Untested, but something like:
add_action( 'pre_get_posts', 'cindy_show_all_events' );
function cindy_show_all_events( $query ){
if( $query->is_main_query() && eventorganiser_is_event_query( $query ) ){
if( is_tax( 'event-category' ) ){
//Event category page
$query->set( 'posts_per_page', 100 );
}else{
//Any other event page
$query->set( 'posts_per_page', 150 );
}
}
}
worked! thanks a million!!