wordpress get id from page title

To get the page ID from the page title in WordPress, you can use the get_page_by_title function. First, you need to retrieve the page object using the get_page_by_title function. Next, you can obtain the page ID from the page object using the ->ID property. Here's an example of how you can achieve this:

$page = get_page_by_title( 'Your Page Title' );
if ( $page ) {
    $page_id = $page->ID;
}

Replace 'Your Page Title' with the actual title of the page you want to retrieve the ID for.