Custom fields with URLs get the language ID. How to avoid that?
-
Hi,
I’ve just started using the Polylang plugin. So far everything worked fine. But now I have a little issue I do not know how to solve.
With every post I’ve added a custom field called “sponsor”. In this field I’m adding a URL to a picture in the media library.
$sponsor = get_post_meta( get_the_ID(), 'sponsor', true ); <img src="<?php echo $sponsor; ?>" />
So far it correctly ouputs
<img src="wordpress/wp-content/uploads/2015/08/logo-nike.png" />
But the picture is not displayed. When I hover it, I can see it tried to read
<img src="en/wordpress/wp-content/uploads/2015/08/logo-nike.png" />
Somehow the URL gets rewritten, and an “en/” is added in the beggining. How can I avoid this?
Thanks for your helpMy settings
– Permalink /sample-post/
– Latest posts as a homepage
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom fields with URLs get the language ID. How to avoid that?’ is closed to new replies.