0

I have created 15 post and assigned to the custom taxonomy. It is not displaying all the 15 post. It shows only 10 post.

Please guide me. Thanks

wp_reset_query();
$args = array(
    'tax_query' => array(
        array(
            'taxonomy' => 'parent_login_gallery',
            'field'    => 'term_id',
            'terms'    => array($_REQUEST['term_id']),
            'operator' => 'IN',
            'public' => true,
            'has_archive' => true,
        ),
    )
);
1

Try this code.

wp_reset_query();
            $args = array(
                'posts_per_page' => -1,
                'tax_query' => array(
                    array(
                        'taxonomy' => 'parent_login_gallery',
                        'field'    => 'term_id',
                        'terms'    => array($_REQUEST['term_id']),
                        'operator' => 'IN',
                        'public' => true,
                        'has_archive' => true,
                    ),
                )
            );
1

Add the following parameter to your query:

'posts_per_page' => 15

If that does not work check the setting at settings > reading and set the number of posts there.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.