• Resolved radzio1615

    (@radzio1615)


    Hi! I am trying to display a thumbnail / logo. How to do this in wp_query?

    
    $args= array(
    	'post_type' => 'w2dc_listing',
    );
    	
    $loop = new WP_Query($args);	
    
    while($loop->have_posts()): $loop->the_post();
            $meta_value = get_post_meta( get_the_ID() , 'attached_image_as_logo', true );
            echo $meta_value;
    endwhile;
    wp_reset_query();
    
Viewing 1 replies (of 1 total)
  • Thread Starter radzio1615

    (@radzio1615)

    I did it!

    
    $listing = w2dc_getListing(get_the_ID());
    if ($listing->logo_image) {
    	$img_src = $listing->get_logo_url('listing-thumbnail');
    } else {
    	$img_src = get_option('w2dc_nologo_url');
    }
    echo '<img src="'. $img_src .'" />';
    
Viewing 1 replies (of 1 total)
  • The topic ‘How to get listing thumbnail?’ is closed to new replies.