I have a multisite setup and hope to have one site host all the data for a particular CPT. That data would then be used by the other sites without having to duplicate it. My thought is to change the prefix before the query if it is for a certain CPT, and restore it after the query.
- If you have a better idea I'd love to hear it.
- How could I go about doing this? I found the pre_get_posts hook. But it seems the db query is already setup. Can I change the target table in the query? Also, I haven't found an equivalent hook after the query to restore the prefix.
Any thoughts?