• 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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;?>
    Thread Starter furiber

    (@furiber)

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘custom field value inside it’s own tag’ is closed to new replies.