WordPress page id from url

<?php
$page_id = url_to_postid( $url );
?>

Leave a Reply

Your email address will not be published. Required fields are marked *