I am beginner in wordpress and I want to know how can I add links in .po file.

Basically I am using Loco Translate to change language text in plugins and theme.

But I need to add Login page link in that text so user should click on link and

after login success user should same.

  • ok but how can add links in there?
    – Pravin
    Dec 16, 2016 at 12:03

1 Answer 1


Don't add links, no need for HTML in there:

How about this:

$anchor = esc_html_x( 'Google', 'link text for google.com', 'txt-domain' );
$domain = esc_url( __( 'google.com', 'txt-domain' ) );  
$link   = sprintf( '<a href="https://%s">%s</a>', $domain, $anchor );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.