Custom field outside loop displayed as a hyperlink
-
I have a custom field called website. I am displaying this in the sidebar, so it’s called from outside the loop. The code below displays the url (ex:
www.mysite.com
). What I cannot figure out how to do is to turn this into a hyperlink.<?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, 'website', true); ?>
Susan
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Custom field outside loop displayed as a hyperlink’ is closed to new replies.