how to get the page id of a page in wordpress code example Example: get the current page id in wordpress $page_id = get_queried_object_id();