Created
September 18, 2019 10:26
-
-
Save vbaimas/5a701d4d038af913ef39faf7bde458d3 to your computer and use it in GitHub Desktop.
Scenario : You would normally grab a page link via its ID but in the case that you had a localhost which install and an online install the ID was different, how you can link the page? Solutions 3: Retrieve the permalink for a page by slug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="<?php echo get_permalink( get_page_by_path( 'about' ) ); ?>">About Me</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment