Add title to a echoed URL
-
This code gets one url and one text from my custom fields and combines it to a link:
<?php $link = get_post_meta($post->ID, 'link_url', true); $text = get_post_meta($post->ID, 'link_text', true); if ($link){ echo ' · <a href="'.$link .'">'.$text.'</a> '; } ?>I would like to add a title=”description of link”, but this is not possible through custom fields. I tried adding it as a variable in the template, but it was only the variable name itself which was echoed…
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Add title to a echoed URL’ is closed to new replies.