Plugin Author
WPSOLR
(@wpsolr)
Just made tests.
I could not reproduce your count issue.
Try to use the same “Number of results by page” as your theme do when wpsolr is not activated.
Everything is set to show 10 posts per page. In the Solr settings, within General>Reading and within the Template page.
Is there any reason why would be showing double the number of pages needed for the search results?
Plugin Author
WPSOLR
(@wpsolr)
No idea.
Try clear and reindex all your data.
I reindexed all the data and it did not solve the issue.
I realized it might be an issue with how I have customized my search results page, so I ran a test using a simple index.php page and it showed all the results.
My challenge is that I need a customized search results page to show the Solr results. When I use wp_query to adjust how the search results are shown, this is when the pagination doesn’t line up with the number of results.
Here is an example on one of the wp_query I am using:
$key = 's';
$current = $s;
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
$args = array(
//'posts_per_page' => '10',
'order' => 'ASC',
'orderby' => 'title',
'post_type' => 'ad_listing',
'paged' => $paged,
$key => $current
I realize that I could use the Solr search templates for showing the results, but the layout is heavily customized, and it shows a lot of custom fields.
Can I use the wp_query with Solr to create a customized search results page?`
Plugin Author
WPSOLR
(@wpsolr)
No support of custom code.
I understand not supporting custom code, but can you let me know if I can use wp_query with the results?
or
Can you point me in a direction of how to customize the templates then?