Compatibility with FacetWP

  • techniquepix
    Participant
    2 years, 8 months ago #27446

    Hi,
    I need to use FacetWP plugin on the archive page of my CPT, but with WPSOLR activated, facet options are not displayed.
    I found that your plugin uses posts_pre_query filter and returns an empty array. It’s why I don’t have the FacetWP options on my filters, I suppose.
    How could this issue be fixed ?

    Thank you

    wpsolr
    Keymaster
    2 years, 8 months ago #27447

    You cannot use FacetWP or other facet plugins with WPSOLR. WPSOLR facets are built for highly specialized search engine queries rather than SQL queries.

    techniquepix
    Participant
    2 years, 8 months ago #27448

    I don’t want to use the facets of WPSOLR. I need to use the facets of FacetWP.
    I only use WPSOLR for search results page, not on my CPT archive pages.
    I managed to use FacetWP facets on a page with a custom query. But on the archive page of my CPT, FacetWP facets are not working correclty beacause of WPSOLR. And I didn’t activate WPSOLR to replace the archive page of my CPT.
    WPSOLR shouldn’t have an impact of my archive page if I didn’t activate ‘Post Types’ on screen 2.1 in BO, right ?

    wpsolr
    Keymaster
    2 years, 8 months ago #27449

    Indeed, if you selected only the search archive option in screen 2.1, you should be able to use FacetWP on your CPT page.

    What happens if you deactivate WPSOLR utterly?

    techniquepix
    Participant
    2 years, 8 months ago #27450

    If I desactivate WPSOLR everything works fine. The options of FacetWP facets are displayed.
    On my local site, I only activated WPSOLR, without setting any parameters, and I have the problem. As soon as WPSOLR is activated, FacetWP options are not displayed (because the query returns an empty array).

    wpsolr
    Keymaster
    techniquepix
    Participant
    2 years, 8 months ago #27452

    Ok, thanks. Do you have an idea when you will have time to check that and fix it ?
    In the meantime I’ll use a simple page and not the archive page. It works that way.

    Thanks

    wpsolr
    Keymaster
    2 years, 8 months ago #27453

    I will provide a fix in the next few days. I’ll contact you in this thread.

    techniquepix
    Participant
    2 years, 8 months ago #27454

    Great ! Thank you

    wpsolr
    Keymaster
    2 years, 8 months ago #27467

    Both plugins are competing for the the same custom post type archive query, hence the conflict.

    I could not find a fix.

    Can you use a shortcode in a plain page instead of an archive instead?

    techniquepix
    Participant
    2 years, 8 months ago #27468

    But since the configuration “Replace front-end archives” is disabled in our backend for post types, would it be possible to also disable Wpsolr custom query when on an archive page according to this config ?
    There is a method get_is_replace_by_wpsolr_query, would it be possible to add some more logic around ?
    We already use the solution with a shortcode on a plain page but it’s not optimal (WPML compatibility).

    Thanks.

    wpsolr
    Keymaster
    2 years, 8 months ago #27469

    Let me know your custom code, so I can check if it can be integrated in the core.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.