WordPress.org

Forums

How to show different logo on different pages in wordpress theme? (4 posts)

  1. Waazes
    Member
    Posted 12 months ago #

    The theme's header.php code for logo looks like:

    <?php
    		if ($cmsms_option[CMSMS_SHORTNAME . '_text_logo']) {
    			if ($cmsms_option[CMSMS_SHORTNAME . '_text_logo_title'] !== '') {
    				$blog_title = $cmsms_option[CMSMS_SHORTNAME . '_text_logo_title'];
    			} else {
    				$blog_title = (get_bloginfo('name')) ? get_bloginfo('name') : 'Increase';
    			}
    
    			if ($cmsms_option[CMSMS_SHORTNAME . '_text_logo_subtitle_text'] !== '') {
    				$blog_descr = $cmsms_option[CMSMS_SHORTNAME . '_text_logo_subtitle_text'];
    			} else {
    				$blog_descr = (get_bloginfo('description')) ? get_bloginfo('description') : 'Portfolio & Photography';
    			}
    
    			echo '<a href="' . home_url() . '/" title="' . $blog_title . '" class="logo">' . "\n\t" .
    				'<span class="title">' . $blog_title . '</span>' . "\n";
    
    			if ($cmsms_option[CMSMS_SHORTNAME . '_text_logo_subtitle']) {
    				echo '<br />' . "\n" .
    				'<span class="title_text">' . $blog_descr . '</span>' . "\r";
    			}
    
    			echo '</a>';
    		} else {
    			if ($cmsms_option[CMSMS_SHORTNAME . '_logo_url'] === '') {
    				echo '<a href="' . home_url() . '/" title="' . get_bloginfo('name') . '" class="logo">' . "\n\t" .
    					'<img src="' . get_template_directory_uri() . '/img/logo.png" alt="' . get_bloginfo('name') . '" />' . "\r" .
    				'</a>' . "\n";
    			} else {
    				echo '<a href="' . home_url() . '/" title="' . get_bloginfo('name') . '" class="logo">' . "\n\t" .
    					'<img src="' . ((is_numeric($cmsms_option[CMSMS_SHORTNAME . '_logo_url'])) ? array_shift(wp_get_attachment_image_src($cmsms_option[CMSMS_SHORTNAME . '_logo_url'], 'full')) : $cmsms_option[CMSMS_SHORTNAME . '_logo_url']) . '" alt="' . get_bloginfo('name') . '" />' . "\r" .
    				'</a>' . "\n";
    			}
    		}
    	?>

    Any help gratefully accepted!

  2. esmi
    Forum Moderator
    Posted 12 months ago #

    What theme are you using? Where did you download it from?

  3. Waazes
    Member
    Posted 12 months ago #

  4. cubecolour
    ɹoʇɐɹǝpoɯ
    Posted 11 months ago #

    Support for commercial themes cannot be provided here. Your theme's vendor may be able to help you with this.

Reply

You must log in to post.

About this Topic