WordPress page id from url

$page_id = url_to_postid( $url );

Leave a Reply

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