• I’d assumed get_permalink(post_id) returned the full canonical link for the post but I’ve got a user using some of my code and its failing because get_permalink(post_id) is only returning a relative url (i.e its missing the http://domain.name.here) part.

    Is this a configuration issue? I’m wondering if he’s managed to screw something up in the permalink settings.

Viewing 2 replies - 1 through 2 (of 2 total)
  • i don’t know why it should be happening. But there are many ways to fix it easily.

    in your theme, you can use this in head (usually named ‘header.php’ in theme)
    <base href="http://domain.name" />

    base

    Moderator keesiemeijer

    (@keesiemeijer)

    Deactivate all plugins and see if it lists the correct urls

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get_permalink returning odd results’ is closed to new replies.