• I am trying to dyncamically insert the permalink without the domain name, So it is relative.

    Obviously the get_permalink function doesn’t support this so is there another function which will display the page URL without the domain name?

    Cheers,
    Mike.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter wealthontap

    (@wealthontap)

    Just to be cealr rather than inserting ‘domainname.com/some-page’ I would like it to just retun ‘some-page’

    Thread Starter wealthontap

    (@wealthontap)

    Turned out to be quite easy

    $plinkurl = get_permalink();
    $plink = substr($plinkurl,23);
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Remove domain from get_permalink’ is closed to new replies.