1

Using sticky post on site near about 5000 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++;
                }
            }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.