Get Page URl when changing slug and permalink
Instead of hardcoding the slug, instead store the ID in an option and then use it to call get_permalink(). You can also avoid hardcoding the $baseUrl and rely on a nav menu or button block instead so that it automatically updates. For example, $page_id = …..; // maybe a `get_option` call or something else? Depends … Read more