WordPress.org

Ready to get started?Download WordPress

Forums

Changing logo based on subdomain access (1 post)

  1. junithorn
    Member
    Posted 1 year ago #

    Trying to make users that enter through predetermined subdomains see a different logo(and eventually a separate login). I tried changing the logo section of my header to the following but the site becomes inaccessible when I do.

    <div class="logo">
    
              <?php if(of_get_option('logo_type') == 'text_logo'){?>
    
              	<?php if( is_front_page() || is_home() || is_404() ) { ?>
                  <h1><a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>"><?php bloginfo('name'); ?></a></h1>
                <?php } else { ?>
                  <h2><a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>"><?php bloginfo('name'); ?></a></h2>
                <?php } ?>
    		  <p class="description"><?php bloginfo('description'); ?></p>
    
    		  <?php } else { ?>
    
              	<?php if(of_get_option('logo_url') != ''){ ?>
    
    			  <?php if( $_SERVER['HTTP_HOST'] == 'wlt.thesojo.net') { ?>
    				<a href="<?php bloginfo('url'); ?>/" id="logo"><img src="/wp-content/uploads/swl.jpg" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('description'); ?>"></a>
                  <?php else{ ?>
    				<a href="<?php bloginfo('url'); ?>/" id="logo"><img src="<?php echo of_get_option('logo_url', "" ); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('description'); ?>"></a>
    		      <?php } ?>	
    
    			<?php } else { ?>
    
                	<a href="<?php bloginfo('url'); ?>/" id="logo"><img src="<?php bloginfo('template_url'); ?>/images/logo.png" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('description'); ?>"></a>
    
    			<?php } ?>
    
              <?php }?>
    
    		  <?php }?>
    
            </div>

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic