Forums

Custom Fields (5 posts)

  1. migbrasil
    Member
    Posted 11 months ago #

    Ok, this is gonna be kinda hard for me to explain b/c im not american...

    so, I download a theme (http://www.zoomstart.com/videographer-wordpress-theme/) this is a youtube theme where we can post our videos... The theme has a custom field where we right the key as vids and value as the youtube video ID.... so the video thumbail's going to appear by the posts title... its pretty neat...

    ex: key=vids value=XtKJLUddt90

    But the thing is i cant use my custom field because I post my videos on another page (not on the writting page http://yourblog/wp-admin/post-new.php) so is there a way, like a php code or something that i could wrrite at the end of my posts so it would get the key and value?? something like:

    <?php $vids = get_post_meta('youtubeid', 'vids'); ?>

    ps.: the php code on the templeta that gets the key and value is:

    <div class="paneleft">
    <?php $vids = get_post_meta($post->ID, 'vids', true); ?>
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="http://img.youtube.com/vi/<?php echo($vids) ?>/2.jpg" alt="<?php the_title(); ?>" width="130px" height="97px" /></a>
    </div>

    sorry if u did not understood me... but at least i tried!!

    Thank You so much

  2. migbrasil
    Member
    Posted 11 months ago #

    ps: here is a video where you can see him doing the custom fields that i am talking about at about 2:30'

    http://www.thiswickedlife.com/videographer/

  3. migbrasil
    Member
    Posted 11 months ago #

    anybody? :/

  4. dressedinvalue
    Member
    Posted 11 months ago #

    Seems like you might be able to use this same code <?php $vids = get_post_meta($post->ID, 'vids', true); ?> on your single.php template (after the_content but still inside the loop). Does that make sense? Did I understand you correctly?

  5. dressedinvalue
    Member
    Posted 11 months ago #

    Btw, it might help to read over get_post_meta.

Reply

You must log in to post.

About this Topic