Viewing 2 replies - 1 through 2 (of 2 total)
  • If you want to remove the default thumbnail from a single listing but still want to keep the ability to show an image, replace the following code found in the single.php template

    <div class="col-md-4">
    	<?php echo ldl_get_thumbnail( $post->ID ); ?>
    	<?php ldl_get_contact_form(); ?>
    </div>

    with the following code.

    <div class="col-md=4">
    	<?php
    		$thumbnail = ldl_get_thumbnail( $post->ID );
    		if ($thumbnail) {
    			echo ldl_get_thumbnail( $post->ID );
    		}
    	?>
    	<?php ldl_get_contact_form(); ?>
    </div>

    What we did here was create a create a variable that is populated with the thumbnail information. We then created a condition that will only echo the thumbnail if the variable we created is populated.

    I haven’t tested this and just thought it up off the top of my head so there is a chance it may still show the default thumbnail if the default thumbnail populates the variable. In that case, you can try the following.

    <div class="col-md-4">
    	<?php
    		$thumbnail = ldl_get_thumbnail( $post->ID );
    		if(false !== stripos($thumbnail, 'noimage.png')) {
    			echo ldl_get_thumbnail( $post->ID );
    		}
    	?>
    	<?php ldl_get_contact_form(); ?>
    </div>

    I think this can be done in the category.php template as well.

    John

    (@lordalerion)

    Hello, thanks for trying to solve this problem but neither solution worked ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Removing logo feature on listings’ is closed to new replies.