Forum Replies Created
-
ukdesignservicesParticipant4 years, 2 months ago in reply to: How do you get facet widgets to appear on a custom post type / taxonomy page? #13512
Thank you, I’ll try that.
ukdesignservicesParticipant4 years, 2 months ago in reply to: How do you get facet widgets to appear on a custom post type / taxonomy page? #13510Thanks but unfortunately that’s not making any difference.
I have tried with everything checked:
https://www.dropbox.com/s/sc19dc127dhi607/replace-archives.PNG?dl=0
but the widgets are still not rendering.Looking at get_is_replace_by_wpsolr_query():
$is_replace_by_wpsolr_query = ! is_admin() && is_main_query() && WPSOLR_Service_Container::getOption()->get_search_is_use_current_theme_search_template(); if ( $is_replace_by_wpsolr_query ) { $is_replace_by_wpsolr_query = false; /** * Search */ if ( ! $is_replace_by_wpsolr_query && WPSOLR_Service_Container::getOption()->get_search_is_replace_default_wp_search() ) { $is_replace_by_wpsolr_query = is_search(); } /** * WordPress post archives */ if ( ! $is_replace_by_wpsolr_query && WPSOLR_Service_Container::getOption()->get_search_is_replace_default_wp_home() ) { $is_replace_by_wpsolr_query = is_home(); } if ( ! $is_replace_by_wpsolr_query && WPSOLR_Service_Container::getOption()->get_search_is_replace_default_wp_author() ) { $is_replace_by_wpsolr_query = is_author(); } if ( ! $is_replace_by_wpsolr_query && WPSOLR_Service_Container::getOption()->get_search_is_replace_default_wp_year() ) { $is_replace_by_wpsolr_query = is_year(); } if ( ! $is_replace_by_wpsolr_query && WPSOLR_Service_Container::getOption()->get_search_is_replace_default_wp_month() ) { $is_replace_by_wpsolr_query = is_month(); } if ( ! $is_replace_by_wpsolr_query && WPSOLR_Service_Container::getOption()->get_search_is_replace_default_wp_day() ) { $is_replace_by_wpsolr_query = is_day(); } if ( ! $is_replace_by_wpsolr_query && WPSOLR_Service_Container::getOption()->get_search_is_replace_default_wp_category() ) { $is_replace_by_wpsolr_query = is_category(); } if ( ! $is_replace_by_wpsolr_query && WPSOLR_Service_Container::getOption()->get_search_is_replace_default_wp_tag() ) { $is_replace_by_wpsolr_query = is_tag(); } if ( ! $is_replace_by_wpsolr_query && WPSOLR_Service_Container::getOption()->get_search_is_replace_default_wp_post_type() ) { $is_replace_by_wpsolr_query = is_post_type_archive(); } }
I don’t see how
$is_replace_by_wpsolr_query
will ever return true on a custom taxonomy page on a custom post type.ukdesignservicesParticipant4 years, 2 months ago in reply to: How do you get facet widgets to appear on a custom post type / taxonomy page? #13508Okay, I think I’ve found the issue. It looks like it will work on an archive of all posts of a given type, but not on a taxonomy term.
Could you advise on how to extend
get_is_replace_by_wpsolr_query()
to include a condition for:$is_replace_by_wpsolr_query = (is_archive() && is_tax());
Many thanks
ukdesignservicesParticipant4 years, 2 months ago in reply to: How do you get facet widgets to appear on a custom post type / taxonomy page? #13507Thanks for your reply. Unfortunately this is not working for me. I have checked ‘Custom post types’ in screen 2.1 but neither the sort or facets widgets are rendering.
Debugging, I can see that:
return self::$is_replace_by_wpsolr_query;
returns false before checkingWPSOLR_Service_Container::getOption()->get_search_is_replace_default_wp_post_type()
Any idea how I can fix this?
Many thanks
ukdesignservicesParticipant4 years, 2 months ago in reply to: How do you get 'Did You Mean' and 'Search Information' blocks to appear? #13504Thanks for the detailed response. Yes, that is clearer.
ukdesignservicesParticipant4 years, 2 months ago in reply to: How do you get 'Did You Mean' and 'Search Information' blocks to appear? #13502Thanks. Sorry for the confusion, but the plugin indicates that the Ajax search templates are deprecated:
https://www.dropbox.com/s/wct3bmpy0od90tv/ajax-search.PNG?dl=0
Is that not the case?
ukdesignservicesParticipant4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12862There were a couple of conditions for taxonomy pagination. If no pagination settings existed the default in
pre_get_posts
was:$query->set('paged', 0); $query->set( 'posts_per_page', -1);
In the plugin settings, ‘2.1 Presentation’ the ‘No. of results per page’ was set to 15. The plugin was superseding ‘posts_per_page’, limiting the search to 15 results, but the pre_get_posts ‘paged’ condition kept resetting the query to the first page.
Thank you for all your help.
ukdesignservicesParticipant4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12860Ah ha. Okay I’ve found the issue, it was in pre_get_posts. Sorry for wasting your time.
ukdesignservicesParticipant4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12858That’s in the dynamic sidebar:
https://www.dropbox.com/s/2sl10yxmcv1rczf/search-sidebar.PNG?dl=0
ukdesignservicesParticipant4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12856Sorry, I tried to post the actual template code but it keeps redirecting me to the homepage when I click ‘Add Reply’
ukdesignservicesParticipant4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12855It’s just a very basic search.php template:
get_header()
dynamic_sidebar()
while(have_postS()) loop
paginate_links()
get_footer()ukdesignservicesParticipant4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12853Hi, no there are no errors. I’ve uploaded the site to my dev server in case that helps:
https://dev.tickets.co.uk/?s=london
If possible please can you remove this comment afterwards as the site is still under development?
Thank you very much.
ukdesignservicesParticipant4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12851Hi. Yes, the URL changes, eg: localhost/page/2/?s=query. I’ve also tried manually appending paged= and wpsolr_page= parameters but neither make a difference.
ukdesignservicesParticipant4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12849Hi, thanks for getting back to me. Certainly, here’s a quick video showing the pagination issue:
https://www.dropbox.com/s/wf5t76aenkdbgk2/ice_video_20190705-094415.mp4?dl=0
I’d be very grateful for any help or suggestions. It is only occurring on search, paginated taxonomies are working as usual.
Many thanks
ukdesignservicesParticipant4 years, 3 months ago in reply to: ACF Date Fields not appearing #12810Hi, thanks for your reply. I did have those fields posts published yes (every product has a start_date and end_date field). Interestingly, I’ve just deleted all posts and reimported everything from my production server, deleted my index and rebuilt it and now those two fields are appearing, so I think it’s solved.
Thanks all the same.