I just wanted to clarify another related issue with {post_url}.
Currently, {post_url} returns the URL of the post item inside the loop, not the actual page URL where the AJAX popup is opened.
So for example, if I open the popup from a page using a loop/grid, {post_url} still outputs the post permalink instead of the current page URL.
This becomes problematic when trying to pass the page context or current URL inside AJAX popups.
Maybe this is expected behavior, but having access to the current page URL inside the popup would be very useful as well.
Hey, yep, this is expected. If you open the popup from inside a loop, then {post_url} will return the URL of the post. Because most of the time, that is what you would use/need.