I'm using a plugin, that renders a A HREF link. But I like the plugin also to open another link at the same time, so I added.
onClick="window.open(\'http://www.website.com\')"
So in the .php file of the plugin it ends up like this:
$title = '<a onClick="window.open(\'http://www.website.com\')" href="#'.$id.'">'.$title.'</a>';
But here's my problem. I'd like the link in every post to be different, by using a custom field. The custom field is called LINK. And the value is: http://www.website.com.
Normally, I know how to add a custom field, by doing this:
<?php echo get_post_meta($post->ID, "LINK", true);?>
But if I'm adding the following, i'm getting an error message:
$title = '<a onClick="window.open(\'<?php echo get_post_meta($post->ID, "LINK", true);?>\')" href="#'.$id.'">'.$title.'</a>';
Anyone know how to solve this?