> For the complete documentation index, see [llms.txt](https://docs.acpt.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acpt.io/developers/actions/acpt-elementor_pro-current_post_id_fallback.md).

# 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

```php
add_filter("acpt/elementor_pro/current_post_id_fallback", function(int $candidateId, string $context, $tag){
    // return your own post ID
    return $candidateId;
}, 10, 3);
```
