Straight forward in concept, but the execution is kinda messy. It would be a lot easier to import an entire post than part of it, as you have discovered. Why not keep the portion to import as a separate post and import it where desired, including into the post from which you now want to extract from?
That was my first work-around, but that would mean dozens of posts. It’s just not maintainable at this stage. I ended up just anchor-linking between pages – not what I initially wanted, but it somewhat works 🙂
Thanks for your reply <3
Collecting others thoughts on a matter is usually a good idea. Linking to other content is a good option, it is the basic concept for HTML after all 🙂 The ability to skip link to a specific section makes it even more powerful.
Revisiting the separate post concept, the content has to live somewhere after all. It’s not the additional posts that I see as a a drawback, but keeping them from showing up in archive or search lists. That shortcoming is relatively easy to address by assigning a particular category like “partial-post”, then excluding that category from most multi-post queries. Or instead, perhaps the posts have a different author. Anything that differentiates partial posts from normal posts.
Such partial posts could be included in other content by way of a shortcode which behaves similar to an iframe. I’m not trying to sell this concept, I personally think links are just fine. My aim is to better illustrate how it might all work so you can best decide for yourself if it’s something you want to pursue.
In fact, your original idea is not impossible, but having code parse through post content looking for a specific section is far from optimal. Fetching an entire partial post is much better from a coding/performance/efficiency standpoint. But then linking to other content is the best solution from that standpoint 🙂