Site icon Qaisar Satti's Blogs

WordPress get page URL

Today we talk about WooCommerce or WordPress get page URL. In this tutorial, We focus on getting the page URL by page id. You can use the get_permalink function to get the product URL. You need to pass the page id to get the URL.

Let’s start with our example.

$pageId      = 1; // page id
$pageUrl = get_permalink($pageId)
Exit mobile version