• OK here’s the setup:

    I have a single page set to the home page. No posts.
    I have this page using a custom template.

    The permalink that is returned for this page is the domain (ie. https://example.com). According to the documentation I should be able to use get_permalink(id) to return the permalink for the given page/post via the id. It is my understanding that the permalink is what you have set in the page/post editor (ie. https://example.com/pages/page-1).

    So why is it not returning the correct(?) permalink?

    Any thoughts on how to get the correct one?

  • The topic ‘issue with get_permalink’ is closed to new replies.