acpt/elementor_pro/current_post_id_fallback
Override the post ID ACPT resolves inside an Elementor Pro context where the global $post is unavailable
Type: Filter
Allows overriding the post ID that ACPT resolves when running inside an Elementor Pro context (e.g. a popup) where the global $post is unavailable.
Parameters
Parameter
Type
Description
$candidateId
int
The post ID ACPT would otherwise fall back to
$context
string
The Elementor Pro context identifier
$tag
mixed
The dynamic tag instance being resolved
Return: int — the post ID to use.
Usage
add_filter("acpt/elementor_pro/current_post_id_fallback", function(int $candidateId, string $context, $tag){
// return your own post ID
return $candidateId;
}, 10, 3);Last updated