Thread: Tech Quick PHP question
View Single Post
Old 01-11-2017, 01:05 AM  
incredibleworkethic
Confirmed User
 
incredibleworkethic's Avatar
 
Industry Role:
Join Date: Sep 2009
Posts: 2,302
This is me basically trying to link the featured image. Usually templates allow me to hardcode the featured image but this thing is deeply embedded.

PHP Code:
            $str .= '<div class="thumb-wrap"><a href="'.the_field('url').'">';
            if ( 
'gallery' == get_post_format$post->ID ) ) {
                
$str .= tn_moduleSingleSlider$post->ID$options['style'] );
            } elseif ( 
function_exists"has_post_thumbnail" ) && has_post_thumbnail$post->ID ) ) {
                
$featured_thumb tn_get_theme_option'tn_single_post_featured_image' );
                switch ( 
$featured_thumb ) {
                    case  
'full' :
                        
$str .= get_the_post_thumbnail$post->ID'native-image-thumb' );
                        break;
                    case 
'hide' :
                        
$str .= '';
                        break;
                    default:
                        
$str .= get_the_post_thumbnail$post->ID'blog_classic_thumb' );
                };
            }
            
$str .= '</a></div>';
        }; 
incredibleworkethic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote