Linking Custom Fields to Database Records

Custom field data saved in the wp_postmeta table. Best way to access custom field is using wordpress built-in functions. for example: <?php $mykey_values = get_post_custom_values(‘my_key’); foreach ( $mykey_values as $key => $value ) { echo “$key => $value (‘my_key’)<br />”; } ?> 0 => First value (‘my_key’) 1 => Second value (‘my_key’) 2 => Third … Read more

Display URL in a Custom Field

You are using get_the_title(), which needs to be echoed out. However, you have it inside the string. Also, you might want to use isset() rather than !empty(). Try this: if( isset( $destino_web ) && $destino_web !== ”) { echo sprintf(‘<p><strong>Web:</strong><a href=”https://wordpress.stackexchange.com/questions/168579/%s”>%s</a></p>’, $destino_web, get_the_title() ); }