• Using the debugger on the page that holds a Gravityview directory with pagination enabled it is clear to me that only the first and last pages of the pagination appear to be indexed. I had to turn off pagination to have Relevanssi index all the words inside the view.

    I was wondering if there are settings I am missing to improve this experience or if it is just how the shortcode feature works?

    I was also wondering if I run an index and then turn pagination back on if the index will maintain the list of words as long as I don’t run a full index build.

    Thank you for your time.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    (@msaari)

    If you’ve set Relevanssi to expand shortcodes in indexing, Relevanssi puts the content through WordPress’ do_shortcode() function, which then makes GravityView do whatever it does. So there’s very little Relevanssi can do about it. This generally works well, but if you have a shortcode where the content is fetched dynamically, that content will be invisible to Relevanssi.

    In a case like this, I would recommend ignoring the shortcode and instead creating a filter function on the relevanssi_content_to_index hook. This hook can be used to add extra content to posts when they are indexed. You could create function that fetches all the paginated content and adds it to the post, making it visible for Relevanssi.

    Another option is to disable the pagination for the duration of the indexing. If you know how to turn off the pagination from PHP code, you could do that in a filter function set to the hook relevanssi_post_content, then have Relevanssi index the shortcode without pagination, and then you can re-enable the pagination in a filter function on the relevanssi_post_content_after_shortcodes hook which runs directly after the shortcodes are processed.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.