Set special mail tags outside the loop
-
Hi @takayukister,
_post_title, _post_url, etc, are only set inside “the loop”, but sometimes, there’s a need to capture them outside “the loop”, e.g. in a popup that’s hooked to
wp_footer
.It should be possible to hook
get_queried_object()
at a suitable point to capture default values for the special mail tags, and use the current code to override these values if the form is embedded inside “the loop”.I’m not saying it’s easy (I’ve tried), but you’re better at this than I am, so I have faith.
Thank you!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Set special mail tags outside the loop’ is closed to new replies.