{
  "name": "bricks/builder/data_post_id",
  "kind": "filter",
  "url": "https://academy.bricksbuilder.io/developer/hooks/filters/bricks-builder-data_post_id/",
  "scraped_at": "2026-08-29",
  "hook_name": "bricks/builder/data_post_id",
  "description": {
    "en": "Filters the post ID used by Bricks to retrieve page data (header, content, footer). This allows you to programmatically change the source of the Bricks data for the current page request.",
    "zh": "筛选 Bricks 用于检索页面数据（页头、内容、页脚）的文章 ID。允许你以编程方式更改当前页面请求中 Bricks 数据的来源。"
  },
  "parameters": [
    {
      "name": "post_id",
      "type": "int",
      "type_zh": null,
      "description": {
        "en": "The current post ID.",
        "zh": "当前正在编辑的文章 ID。"
      }
    }
  ],
  "example_usage": "add_filter( 'bricks/builder/data_post_id', function( $post_id ) {\n    // Example: Use a specific post ID for a custom route\n    if ( get_query_var( 'my_custom_route' ) ) {\n        return 123; // ID of the post/template to use\n    }\n\n\n    return $post_id;\n} );"
}