Title: logo
Last modified: August 22, 2016

---

# logo

 *  Resolved [dileepraja](https://wordpress.org/support/users/dileepraja/)
 * (@dileepraja)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/logo-59/)
 * Hi i am uploading two images main logo and small logo when main logo appears 
   small logo should be hide small logo appear main logo should be hide using option
   tree how
 * _[ Moderator note: code fixed. Please wrap code in the backtick character or 
   [use the code button](http://codex.wordpress.org/Forum_Welcome#Posting_Code).]_
 *     ```
       <a>" >
       					<img src="<?php if ( isset( $logoUrl['background-image'] ) ) echo $logoUrl['background-image']; ?>" id="main-logo" />
       					<img src="<?php if ( isset( $smallLogoUrl['background-image'] ) ) echo $smallLogoUrl['background-image']; ?>" id="main-logo-min" />
       				</a>
       ```
   

Viewing 1 replies (of 1 total)

 *  [Jay](https://wordpress.org/support/users/phyrax/)
 * (@phyrax)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/logo-59/#post-5532878)
 * Your code has conditionals but it’s only checking if both is set, if so, it’s
   displaying both logos. Instead, break the two down into one single conditional,
   and set the image source and id’s depending on what you want. You could probably
   compress this a bit, but should do the job.
 *     ```
       <a>
       	<?php
       	$src = '';
       	$id  = '';
       	if( isset( $logoURL['background-image'] ) ){
       		$src = $logoURL['background-image'];
       		$id = 'main-logo';
       	} elseif( isset( $smallLogoUrl['background-image'] ) ){
       		$src = $smallLogoUrl['background-image'];
       		$id = 'main-logo-min';
       	}
       	?>
       	<img src="<?php echo $src; ?>" id="<?php echo $id; ?>" />
       </a>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘logo’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Jay](https://wordpress.org/support/users/phyrax/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/logo-59/#post-5532878)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
