Created
September 18, 2019 10:20
-
-
Save vbaimas/f2b0ceded8b91254bed646e3ebc5aac7 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? Solution 2 : Retrieve the permalink for a page by title
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_title( 'about' ) ); ?>">About Me</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment