Tag Info

New answers tagged

0

The first error message is for undefined variable which you used $request[0] and second one is for $request is not a object so you cannot use as object. I suggest you that use below code and check what you missed: $request = $wpdb->get_results( $wp_query->request ); print('<pre>'); print_r($request); print('</pre>'); exit; Above code ...


0

If $wp_query->post_count == 0 I cant see how $wpdb->get_results( $wp_query->request ) would return any posts. So basically $request = $wpdb->get_results( $wp_query->request ); contains nothing and $request[0] doesn't exist. Ergo PHP Notice: Undefined offset: 0 It would be interesting to know, what this could is supposed to achieve.



Top 50 recent answers are included