• Hi guys
    Could you take a look at the css of this

    http://www.gigflick.co.uk/2009/05/taking-back-sunday/

    in the section which shows

    Posted on: May 13, 2009
    Comment on This Video
    Share This Video
    Embed This Video

    I want to some sections such as Date Taken and Venue and City so it looks like this

    Posted on: May 13, 2009
    Date Taken: Example
    Venue: Example
    City: Example
    Comment on This Video
    Share This Video
    Embed This Video

    I know you can do this by custom fields, i can create them fine etc but what do i need to add into single.php to get this to work?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter mikem1986

    (@mikem1986)

    PS: ive tried following the instructions on WP Codex but cant get my head round it

    Thread Starter mikem1986

    (@mikem1986)

    anyone?

    Thread Starter mikem1986

    (@mikem1986)

    ive tried using

    <?php the_meta(); ?>

    but this brings in all my custom fields so it adds the images and thumbnails when i only want venue, city and date

    Ive also tried echoing with

    <p class=”itemlinks”>Venue: <? echo get_post_meta($post_id, ‘venue’, true); ?>
    <p class=”itemlinks”>Date: <? echo get_post_meta($post_id, ‘date:’, true); ?>
    <p class=”itemlinks”>City: <? echo get_post_meta($post_id, ‘city’, true); ?>

    this then just doesnt show the information?

    where am i going wrong?

    Thread Starter mikem1986

    (@mikem1986)

    Sorted it

    <p class=”itemlinks”>date: <?php $key=”date”; echo stripslashes(get_post_meta($post->ID, $key, true)); ?> </p>

    <p class=”itemlinks”>Venue: <?php $key=”venue”; echo stripslashes(get_post_meta($post->ID, $key, true)); ?> </p>

    <p class=”itemlinks”>city: <?php $key=”city”; echo stripslashes(get_post_meta($post->ID, $key, true)); ?> </p>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding Custom Fields’ is closed to new replies.