if custom field img
-
Hi.
How to use if when I have custom field, like this..In this side I have this:
<div class="thumbnail-forare"> <?php if ( has_post_thumbnail() ) { // Om inl?gget har en thumbnail } else { // Om inl?gget inte har en nagel } ?> <?php the_post_thumbnail(); ?> <?php if ( '' != get_the_post_thumbnail() ) { // some code } else { // some code echo '<img src="' . get_bloginfo( 'stylesheet_directory' ) . '/images/thumbnails/default-1.jpg" />'; } ?> </div> <!-- thumbnail -->
Works perfect. But when I will have the same in single.php (in this side) I need to use custom field instead of thumbnails but then I don’t get it to work. Pleas help, I would really appreciate it.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘if custom field img’ is closed to new replies.