• ant123

    (@ant123)


    Sorry if this has been asked before, I searched for the answer, but couldn’t find it so far.

    I hard coded in the footer a link to a page of the site.

    The target page exists in two translations.

    I’d like to know the php code for the link, so that it points to the version of the page in the correct/current language.

    Thanks

    • This topic was modified 8 years ago by ant123.
    • This topic was modified 8 years ago by ant123.
Viewing 1 replies (of 1 total)
  • ceer

    (@ceer)

    You can use
    <?php echo get_page_link(pll_get_post($ID)); ?>
    with $ID the post ID of one your posts.

    • This reply was modified 8 years ago by ceer.
    • This reply was modified 8 years ago by ceer.
    • This reply was modified 8 years ago by ceer.
Viewing 1 replies (of 1 total)

The topic ‘Custom php link’ is closed to new replies.