• Using sticky post on site near about 50000 sticky post i have.

    In wp-includes/query.php here i have bellow snippet code.on line 3748 to 3760.If i comment this code the blog page work properly. if uncomment this blog page gives 500 error but all sites work fine except blog page.

    So can any body will tell me why this happening and how to resolve it .

    I have try with disabling all plugins,changed the theme , htaccess. but not worked for me.so an any one tell me how do solve this issue.

    // Fetch sticky posts that weren't in the 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 as $sticky_post ) {
    					array_splice( $this->posts, $sticky_offset, 0, array( $sticky_post ) );
    					$sticky_offset++;
    				}
    			}
Viewing 2 replies - 1 through 2 (of 2 total)
  • Try checking your site’s error logs for a more specific error message. Your hosts should be able to help you accessing your site’s error logs.

    Thread Starter sanjaynakate

    (@sanjaynakate)

    there is nothing error log but why this works if i comment above code .

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Blog page 500 internal error with query.php (Fetch sticky posts that weren't in)’ is closed to new replies.