Here’s what the the content looks like at the point of relevanssi_post_content_after_shortcodes:
(I output this to the using the error_log function. I’m redacting some content to keep the project private.)
[22-Jun-2022 05:09:23] WARNING: child 4377 said into stderr: "NOTICE: PHP message: <p>With a mission to foster.</p>"
[22-Jun-2022 05:09:23] WARNING: child 4377 said into stderr: "<p>Embracing the collaboration. </p> <h2>Want to Learn more?</h2> "
There are two Divi Code modules each with a Pods shortcodes between the last </p> and the <h2> which aren’t showing up. But this is where the plot thickens because there’s also a hardcoded <h4> in those code modules which isn’t part of the Pods shortcode and that’s also not showing up.
Here’s what the code inside the Divi Code module looks like:
<h4>
Committee Chair
</h4>
<div class="people-list">
[pods name="person" where="rel_committee_chair_of.post_title = 'Some Committee'" template="List of People - Committee Chairs"][/pods]
</div>
Seeing that the <h4>Committee Chair</h4> text didn’t show up in the indexing, it looks like the problem is actually with the Divi Code module and not the processing of the Pods shortcodes.
In fact I confirmed this by putting the Pods shortcode inside a Divi Text module, and when I did that, Relevanssi indexed it correctly.
So whatever Divi is doing with their Code module is preventing Relevanssi from seeing content in there. For my purposes, my problem is essentially solved. I don’t need to use the Code module to insert shortcodes; I can just change all of the shortcodes to use a Text module instead. But this is probably something you will want to look into to see if there is a way for Relevanssi to index content inside of the Divi Code module.
Thanks for your help in sorting this out. I wouldn’t have figured it out without the clues from the relevanssi_post_content_after_shortcodes function.