furiber
Member
Posted 4 months ago #
hello, im new to custom fields, so i was wondering, is it posible to get the value (since it's only the key that does it) of a custom field inside a particular tag?
let me show you what i want:
the output im getting is
<ul class="post-meta">
<span class="post-meta-key">Dolar:</span>
2214
is there a way to get it this way:
<ul class="post-meta">
<span class="post-meta-key">Dolar:</span>
<span class="value">2214<span>
thank you in advance.
How about:
<?php
if(get_post_meta($post->ID, 'key_name')):?>
<span class="post-meta-key">Dolar:</span>
<span class="value"><?php echo get_post_meta($post->ID, 'key_name',true);?><span>
<?php endif;?>
furiber
Member
Posted 4 months ago #
i'm kinda lost here, i don't know what exact change should i do so i can get it out thath way.
i think i have to replace some ID ro something but not really sure. help once again. LOL
thanks, you very much for your help.