Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /****************************************************************
- * To use custom fields put the following code where you want use
- * Replace 'key' by your custom fields name
- ****************************************************************/
- <?php echo get_post_meta($post->ID, 'key', true); ?>
- /****************************************************************
- * The following code will show custom fields when you set custom field
- * Other wise it won't show the custom fields
- * Replace 'key' by your custom fields name
- ****************************************************************/
- <?php if ( get_post_meta( get_the_ID(), 'key', true ) ) : ?>
- <a href="<?php the_permalink() ?>" rel="bookmark">
- <img class="thumb" src="<?php echo get_post_meta( get_the_ID(), 'key', true ); ?>" alt="<?php the_title(); ?>" />
- </a>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement