Quantcast
Channel: fetch_feed(custom field url) printing out the url rather then using it | WordPress.org
Viewing all articles
Browse latest Browse all 18

Reply To: fetch_feed(custom field url) printing out the url rather then using it

$
0
0

what is the value of $url if you echo it directly after you extracted it from your custom field?

imho, the error seems to be coming from your usage of:
get_custom_field_value()

(which is not genuine wordpress, but seems to be an extra function(?):

function get_custom_field_value($szKey, $bPrint = false) {
	global $post;
	$szValue = get_post_meta($post->ID, $szKey, true);
	if ( $bPrint == false ) return $szValue; else echo $szValue;
}

(correct me if i am wrong)

if i understand you code properly, you could try this instead:

$url = get_post_meta($page_id, 'address', true); //custom field

btw:
the code thing works by pressing the code button once before you paste the code, then once again after.
or
highlight the code with the mouse, and the press the code button once.


Viewing all articles
Browse latest Browse all 18

Trending Articles