Open justintadlock opened 8 years ago
In the dialog_html_form() method, you can't always rely on the global $post variable in the footer. You can only rely on that within The Loop.
dialog_html_form()
$post
Instead, check is_single() and use get_queried_object_id() to get the post ID.
is_single()
get_queried_object_id()
Make sure to pass that post ID into get_post_type() there too.
get_post_type()
In the
dialog_html_form()
method, you can't always rely on the global$post
variable in the footer. You can only rely on that within The Loop.Instead, check
is_single()
and useget_queried_object_id()
to get the post ID.Make sure to pass that post ID into
get_post_type()
there too.