Reputation: 3469
I have a WordPress site that has a footer with some custom links. (child theme development)
I do not want to put them into another menu element, I just want it to link to a specific page, but I'm not sure how I can link it to a specific page if I don't know the title
Can I hook it to a tag or some other feature that I can attach to the page and link to that?
Upvotes: 1
Views: 396
Reputation: 78706
I think you're looking for get_permalink()
function.
Example:
<a href="<?php echo get_permalink( 268 ); ?>">My link to a post or page</a>
Upvotes: 1