Forum Replies Created

  • ukdesignservices
    Participant

    Thank you, I’ll try that.

    ukdesignservices
    Participant

    Thanks 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.

    ukdesignservices
    Participant

    Okay, 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

    ukdesignservices
    Participant

    Thanks 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 checking WPSOLR_Service_Container::getOption()->get_search_is_replace_default_wp_post_type()

    Any idea how I can fix this?

    Many thanks

    ukdesignservices
    Participant

    Thanks for the detailed response. Yes, that is clearer.

    ukdesignservices
    Participant

    Thanks. 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?

    ukdesignservices
    Participant
    4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12862

    There 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.

    ukdesignservices
    Participant
    4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12860

    Ah ha. Okay I’ve found the issue, it was in pre_get_posts. Sorry for wasting your time.

    ukdesignservices
    Participant
    4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12858
    ukdesignservices
    Participant
    4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12856

    Sorry, I tried to post the actual template code but it keeps redirecting me to the homepage when I click ‘Add Reply’

    ukdesignservices
    Participant
    4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12855

    It’s just a very basic search.php template:

    get_header()
    dynamic_sidebar()
    while(have_postS()) loop
    paginate_links()
    get_footer()

    ukdesignservices
    Participant
    4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12853

    Hi, 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.

    ukdesignservices
    Participant
    4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12851

    Hi. 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.

    ukdesignservices
    Participant
    4 years, 3 months ago in reply to: Pagination Issue version 21.5 #12849

    Hi, 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

    ukdesignservices
    Participant
    4 years, 3 months ago in reply to: ACF Date Fields not appearing #12810

    Hi, 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.

Viewing 15 posts - 1 through 15 (of 18 total)