• streamview

    (@streamview)


    Hi Everyone
    I added to the index.php <?php the_meta(); ?>
    which will make me add custom field to the post.
    Name = Country Value = Canada

    how i do the same if i want to add flag Icons , instead of the text value .
    so it will be Country = ( the icon of the canadian flag)

    thanks

Viewing 1 replies (of 1 total)
  • MichaelH

    (@michaelh)

    Assume you have a custom field call “flag_icon” then put this in your Loop

    <?php $flagicon = get_post_meta($post->ID, 'flag_icon', true); ?>
    <img src="<?php echo $flagicon; ?>" alt="" />
Viewing 1 replies (of 1 total)

The topic ‘custom field’ is closed to new replies.