Do you know that the WordPress have some useful functions to link page and archive page? Let’s see them in action.
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?
Get the permalink for a page by name
Get the permalink for a page by title
Get the permalink for a page by slug
Get the permalink for a page by parent/child
If you want to get the permalink using the method with child-page, then you need to pass the full slug. So, in this case we have a child page “about” with a parent pages which called “skills”.
Get the link to custom post type archive page
If you have a custom posts loop and in the bottom you want to add “View all” link, then how you should lead to the page with all posts that type?
In case that
false, make sure that you have used the argument
has_archive => true when using