wordpress - Blog page Server error 500 with sticky post loop in query.php -


using sticky post on site near 5000 sticky post have.

in wp-includes/query.php here have bellow snippet code.on line 3748 3760.if comment code blog page work properly. if uncomment blog page gives 500 error sites work fine except blog page.

so can body tell me why happening , how resolve .

i have try disabling plugins,changed theme , htaccess. not worked me.so 1 tell me how solve issue.

// fetch sticky posts weren't in query results             if ( !empty($sticky_posts) ) {                 $stickies = get_posts( array(                     'post__in' => $sticky_posts,                     'post_type' => $post_type,                     'post_status' => 'publish',                     'nopaging' => true                 ) );                  foreach ( $stickies $sticky_post ) {                     array_splice( $this->posts, $sticky_offset, 0, array( $sticky_post ) );                     $sticky_offset++;                 }             } 

issue resolved after removing unwanted sticky posts.now using using 10 20 sticky posts.if want set new sticky post removing old sticky post before setting new posts sticky posts. having more 5000 k sticky posts thats why blog page throwing server error 500 , or max time out errors.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -