• Resolved Ken Gagne

    (@kgagne)


    Hello! I’m trying to get VSEL working with FacetWP so that users can filter the events by category. However, FacetWP is proving unable to index the CPT event. From the FacetWP documentation:

    If a certain post type is not getting indexed, or if you get a “The index table is empty” error when trying to re-index, the reason can be that this post type is not being indexed by FacetWP. For a post type to be “searchable”, the exclude_from_search argument of the register_post_type() function must be set to false.

    If the above excerpt is indeed applicable to what I’m trying to do (I’m not a dev, so please bear with me 🙏), how would one go about making VSEL events indexable?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Guido

    (@guido07111975)

    Hi,

    I can add this to next version.
    In the meantime you can test this by adding this to the query:

    'exclude_from_search' => false,

    Keep me informed.

    Guido

    Thread Starter Ken Gagne

    (@kgagne)

    Thanks! That allowed FacetWP to index all of my events (whereas previously it was indexing none). 🎉

    Plugin Author Guido

    (@guido07111975)

    Hi,

    Great, but this means that events are now also included in search results of the default search form / widget.
    I found a way to avoid this, you can add this snippet to file functions of your (child) theme or via the Code Snippets plugin.

    Guido

    Thread Starter Ken Gagne

    (@kgagne)

    Thanks for this!

    I’ve confirmed that the initial change causes the default WordPress search and the Jetpack search to both include events in their results, as you indicated.

    But when I use Jetpack’s instant search function, the events don’t come up, even with exclude_from_search set to false. (I’m not sure if this is because I’ve disabled the single event page/template options on my site. 🤔)

    Regardless, I’ll switch to the FacetWP code you found, as that seems a safer approach and a more consistent experience. But I wanted to report that the original code change works for my particular case, too!

    Thank you for being thorough. 🙏

    Plugin Author Guido

    (@guido07111975)

    Hi,

    Thanks!
    At first I thought it was a nice addition, to include support for that, but now I don’t think many users like to have events in their search results. And they will not even be listed on event date (but publication date).
    It’s still possible, with certain search related plugins.
    Fortunately there’s that snippet.

    Guido

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘FacetWP searches & indexable CPTs’ is closed to new replies.