Conflict with search
-
Hi,
We use Fibosearch for people to search for products in our webshop. When people search for products we want to be able to adjust the number of posts per page that are visible. We got this code from Fibosearch:
// Custom posts per page value for Search Results Page add_action( ‘pre_get_posts’, function ( $query ) { if ( $query->is_search() && ! is_admin() && $query->is_main_query() ) { $query->set( ‘posts_per_page’, 48 ); } } );
The code is working with other themes, but not with our theme OceanWP. Somehow OceanWP takes control over maximum number of products per page, which is 8 products only.The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Conflict with search’ is closed to new replies.