Using Custom Fields directly in your theme!
This is a example how to use the MVB Tags (custom fields) directly in your wordpress theme.
Look this site:
http://www.mmafightvids.com
The thumbail only appears in the index page, not in the video page! How!?
In MVB Settings:
MVB Post Template:
[videodescription] [hide] [videoplayer]
In the index.php of your theme: (Can be other name, depends of the theme)
Replace:
<?php the_content('Read...'); ?>
To:
<?php if(post_custom('mvb_thumb_url')) {?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo post_custom('mvb_thumb_url'); ?>" width="120" height="80" alt="<?php the_title(); ?>" border="0"></a>
<?}?>
<?php the_content(' '); ?>
In the code above, if the videopost has no thumbnail, notting happens, only the description will appears.
Also you can use this code to show a default image if the video has no thumbnail:
<?php if(post_custom('mvb_thumb_url')) {?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo post_custom('mvb_thumb_url'); ?>" width="120" height="80" alt="<?php the_title(); ?>" border="0"></a>
<?} else {?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="URL_TO_DEFAULT_THUMB" width="120" height="80" alt="<?php the_title(); ?>" border="0"></a>
<?}?>
<?php the_content(' '); ?>
If you are changing the post template, try to use the “Post Rebuild” in the MVB Settings.
Have fun!!









Recent comments