Use pagename
instead of page_id
to query by slug. Note that if a page is a child of another page, pagename
has to be the full parent/child path to the page, since slugs only have to be unique per-level in hierarchical post types. See WP_Query
for the full list of query vars.