I have some layout changes that are being applied to
the_content. I need to do one of two things, but neither is working as expected... either:
Pass data to the filter so that it knows if it is a "loop inside a loop" (this pertains to a special post type
eventsthat are outputting multiple events on a given page). The problem is that the
$postobject inside the filter is returning the
$postfor the PAGE, and not the specific item where the filter is about to be applied, so using
post_typewill not work. I wonder if this is bad implementation on the part of the plugin author (calling
$post->post_contentin a non-standard way that is preventing me from accessing it).
The other possibility would be to somehow detect "nested" loops, but the issue I have with this is that the main call to
the_content()seems to be the last one firing, and I'm not sure there's a way to track number of times a loop has fired when I don't have public access to the length of that private
wp_query()the plugin is executing for it's own post type.
Any thoughts on something to fix this... the issue is very significant since it's trying to embed HTML layout intended only for the main page, inside the inner-loop for events.