{
  "name": "bricks/database/content_type",
  "kind": "filter",
  "url": "https://academy.bricksbuilder.io/developer/hooks/filters/bricks-database-content_type/",
  "scraped_at": "2026-08-29",
  "hook_name": "bricks/database/content_type",
  "description": {
    "en": "Filters the content type determined by Bricks for the current page request. This affects which template conditions are checked (e.g., whether to look for a single template, archive template, or search results template).",
    "zh": "修改 Bricks Builder 中可用的 CSS 断点。"
  },
  "parameters": [
    {
      "name": "content_type",
      "type": "string",
      "type_zh": null,
      "description": {
        "en": "The detected content type (e.g., content , archive , search , error , header , footer ).",
        "zh": "检测到的内容类型（例如 content、archive、search、error、header、footer）。"
      }
    },
    {
      "name": "post_id",
      "type": "int",
      "type_zh": null,
      "description": {
        "en": "The current post ID.",
        "zh": "当前文章 ID。"
      }
    }
  ],
  "example_usage": "add_filter( 'bricks/database/content_type', function( $content_type, $post_id ) {\n    // Example: Treat a specific page as a search results page\n    if ( is_page( 'advanced-search' ) ) {\n        return 'search';\n    }\n\n\n    return $content_type;\n}, 10, 2 );"
}