Illegal offset type in isset or empty
-
facing warning in a custom page template (id=108): Illegal offset type in isset or empty
i have a function in functions.php
function my_get_posts( $query ) {
/*** show event type post if passed eventday variable else show post as well in home page ***/
if ( (is_page(108)))
$query->set( ‘post_type’, array( ‘events’ ));
else if ( (is_home() ) && empty( $query->query_vars[‘suppress_filters’] ) )
$query->set( ‘post_type’, array( ‘post’ , ‘events’ ) );
return $query;
}Removing:
if ( (is_page(108)))
solve warning issue..but i need this
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Illegal offset type in isset or empty’ is closed to new replies.