Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Correct comment section
Source Link
Adam
  • 16.5k
  • 1
  • 44
  • 62

I have errors in WordPress:

PHP Notice: Undefined offset: 0 in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

PHP Notice: Trying to get property of non-object in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

Code:

 /***
 * Display Future Posts
 * 
 * Display future post in the events category to all users.
 */
function hoon_show_all_future_posts( $posts ) {

    global $wp_query, $wpdb;

    if ( is_single() && $wp_query->post_count == 0 ) {
        $events_cat = hoon_option( 'events_category' );
        $request = $wpdb->get_results( $wp_query->request );
        /* Line 602 bellow  */  
        if ( post_is_in_descendant_category( $events_cat, $request[0]->ID ) || in_category( $events_cat, $request[0]->ID ) ) {
            $posts = $request;
        }
    }
    return $posts;
}
add_filter( 'the_posts', 'hoon_show_all_future_posts' );

I have errors in WordPress:

PHP Notice: Undefined offset: 0 in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

PHP Notice: Trying to get property of non-object in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

Code:

 /*
 * Display Future Posts
 * Display future post in the events category to all users.
 */
function hoon_show_all_future_posts( $posts ) {

    global $wp_query, $wpdb;

    if ( is_single() && $wp_query->post_count == 0 ) {
        $events_cat = hoon_option( 'events_category' );
        $request = $wpdb->get_results( $wp_query->request );
/* Line 602 bellow  */  
        if ( post_is_in_descendant_category( $events_cat, $request[0]->ID ) || in_category( $events_cat, $request[0]->ID ) ) {
            $posts = $request;
        }
    }
    return $posts;
}
add_filter( 'the_posts', 'hoon_show_all_future_posts' );

I have errors in WordPress:

PHP Notice: Undefined offset: 0 in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

PHP Notice: Trying to get property of non-object in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

Code:

/**
 * Display Future Posts
 * 
 * Display future post in the events category to all users.
 */
function hoon_show_all_future_posts( $posts ) {

    global $wp_query, $wpdb;

    if ( is_single() && $wp_query->post_count == 0 ) {
        $events_cat = hoon_option( 'events_category' );
        $request = $wpdb->get_results( $wp_query->request );
        /* Line 602 bellow  */  
        if ( post_is_in_descendant_category( $events_cat, $request[0]->ID ) || in_category( $events_cat, $request[0]->ID ) ) {
            $posts = $request;
        }
    }
    return $posts;
}
add_filter( 'the_posts', 'hoon_show_all_future_posts' );

I have errors in WordPress:

PHP Notice: Undefined offset: 0 in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

PHP Notice: Trying to get property of non-object in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

Code:

 /***
 * Display Future Posts
 *
  * Display future post in the events category to all users.
 */
function hoon_show_all_future_posts( $posts ) {

    global $wp_query, $wpdb;

    if ( is_single() && $wp_query->post_count == 0 ) {
        $events_cat = hoon_option( 'events_category' );
        $request = $wpdb->get_results( $wp_query->request );
*/* Line 602 bellow  */  
        if ( post_is_in_descendant_category( $events_cat, $request[0]->ID ) || in_category( $events_cat, $request[0]->ID ) ) {
            $posts = $request;
        }
    }
    
    return $posts;
    
}
add_filter( 'the_posts', 'hoon_show_all_future_posts' );

I have errors in WordPress:

PHP Notice: Undefined offset: 0 in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

PHP Notice: Trying to get property of non-object in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

Code:

/**
 * Display Future Posts
 *
  * Display future post in the events category to all users.
 */
function hoon_show_all_future_posts( $posts ) {

    global $wp_query, $wpdb;

    if ( is_single() && $wp_query->post_count == 0 ) {
        $events_cat = hoon_option( 'events_category' );
        $request = $wpdb->get_results( $wp_query->request );
*/ Line 602 bellow  */  
        if ( post_is_in_descendant_category( $events_cat, $request[0]->ID ) || in_category( $events_cat, $request[0]->ID ) ) {
            $posts = $request;
        }
    }
    
    return $posts;
    
}
add_filter( 'the_posts', 'hoon_show_all_future_posts' );

I have errors in WordPress:

PHP Notice: Undefined offset: 0 in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

PHP Notice: Trying to get property of non-object in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

Code:

 /*
 * Display Future Posts
 * Display future post in the events category to all users.
 */
function hoon_show_all_future_posts( $posts ) {

    global $wp_query, $wpdb;

    if ( is_single() && $wp_query->post_count == 0 ) {
        $events_cat = hoon_option( 'events_category' );
        $request = $wpdb->get_results( $wp_query->request );
/* Line 602 bellow  */  
        if ( post_is_in_descendant_category( $events_cat, $request[0]->ID ) || in_category( $events_cat, $request[0]->ID ) ) {
            $posts = $request;
        }
    }
    return $posts;
}
add_filter( 'the_posts', 'hoon_show_all_future_posts' );

I have errors in Wordpress! Please help )

PHP Notice: Undefined offsetWordPress: 0 in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

PHP Notice: Trying to get property of non-object in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

PHP Notice: Undefined offset: 0 in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

PHP Notice: Trying to get property of non-object in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

Code

/**:

  • Display Future Posts

  • Display future post in the events category to all users. */ function hoon_show_all_future_posts( $posts ) {

    global $wp_query, $wpdb;

    if ( is_single() && $wp_query->post_count == 0 ) { $events_cat = hoon_option( 'events_category' ); $request = $wpdb->get_results( $wp_query->request ); */ Line 602 bellow */
    if ( post_is_in_descendant_category( $events_cat, $request[0]->ID ) || in_category( $events_cat, $request[0]->ID ) ) { $posts = $request; } }

    return $posts;

} add_filter( 'the_posts', 'hoon_show_all_future_posts' );

/**
 * Display Future Posts
 *
 * Display future post in the events category to all users.
 */
function hoon_show_all_future_posts( $posts ) {

    global $wp_query, $wpdb;

    if ( is_single() && $wp_query->post_count == 0 ) {
        $events_cat = hoon_option( 'events_category' );
        $request = $wpdb->get_results( $wp_query->request );
*/ Line 602 bellow  */  
        if ( post_is_in_descendant_category( $events_cat, $request[0]->ID ) || in_category( $events_cat, $request[0]->ID ) ) {
            $posts = $request;
        }
    }
    
    return $posts;
    
}
add_filter( 'the_posts', 'hoon_show_all_future_posts' );

I have errors in Wordpress! Please help )

PHP Notice: Undefined offset: 0 in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

PHP Notice: Trying to get property of non-object in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

Code

/**

  • Display Future Posts

  • Display future post in the events category to all users. */ function hoon_show_all_future_posts( $posts ) {

    global $wp_query, $wpdb;

    if ( is_single() && $wp_query->post_count == 0 ) { $events_cat = hoon_option( 'events_category' ); $request = $wpdb->get_results( $wp_query->request ); */ Line 602 bellow */
    if ( post_is_in_descendant_category( $events_cat, $request[0]->ID ) || in_category( $events_cat, $request[0]->ID ) ) { $posts = $request; } }

    return $posts;

} add_filter( 'the_posts', 'hoon_show_all_future_posts' );

I have errors in WordPress:

PHP Notice: Undefined offset: 0 in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

PHP Notice: Trying to get property of non-object in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602

Code:

/**
 * Display Future Posts
 *
 * Display future post in the events category to all users.
 */
function hoon_show_all_future_posts( $posts ) {

    global $wp_query, $wpdb;

    if ( is_single() && $wp_query->post_count == 0 ) {
        $events_cat = hoon_option( 'events_category' );
        $request = $wpdb->get_results( $wp_query->request );
*/ Line 602 bellow  */  
        if ( post_is_in_descendant_category( $events_cat, $request[0]->ID ) || in_category( $events_cat, $request[0]->ID ) ) {
            $posts = $request;
        }
    }
    
    return $posts;
    
}
add_filter( 'the_posts', 'hoon_show_all_future_posts' );
Source Link
Loading