Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Different Logo for each wordpress page Reply To: Different Logo for each wordpress page

#208054
nizam
Participant

I needed the same functionality and tried to use the above code but all in vain. Can you guide me how to have different logo in each WP page.

My header.php code is:

<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till

<

div>
*
* @package Jobify
* @since Jobify 1.0
*/
?><!DOCTYPE html>
<!–[if IE 7]>
<html class=”ie ie7″ <?php language_attributes(); ?>>
<![endif]–>
<!–[if IE 8]>
<html class=”ie ie8″ <?php language_attributes(); ?>>
<![endif]–>
<!–[if !(IE 7) | !(IE 8) ]><!–>
<html <?php language_attributes(); ?>>
<!–<![endif]–>
<head>
<meta charset=”<?php bloginfo( ‘charset’ ); ?>” />
<meta name=”viewport” content=”width=device-width” />

`<title><?php wp_title( ‘|’, true, ‘right’ ); ?></title>

<link rel=”profile” href=”http://gmpg.org/xfn/11&#8243; />
<link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>” />

<meta name=”viewport” content=”initial-scale=1″>

<!–[if lt IE 9]>
<script src=”<?php echo get_template_directory_uri(); ?>/js/source/vendor/html5.js” type=”text/javascript”></script>
<![endif]–>

<?php wp_head(); ?>
`

</head>

<body <?php body_class(); ?>>

`<div>

&lt;header id="masthead" class="site-header" role="banner"&gt;
    &lt;div&gt;
        &lt;a&gt;" title="&lt;?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?&gt;" rel="home" class="site-branding"&gt;
 &lt;!--Editing start from here and i am gona delete all other code from above span section--&gt;

            &lt;?php $header_image = get_header_image(); ?&gt;
            &lt;h1 class="site-title"&gt;
                &lt;?php if ( ! empty( $header_image ) ) : ?&gt;
                    &lt;img /&gt;" width="&lt;?php echo get_custom_header()-&gt;width; ?&gt;" height="&lt;?php echo get_custom_header()-&gt;height; ?&gt;" alt="" /&gt;
                &lt;?php endif; ?&gt;

                &lt;span&gt;&lt;?php bloginfo( 'name' ); ?&gt;&lt;/span&gt;
            &lt;/h1&gt;
            &lt;h2 class="site-description"&gt;&lt;?php bloginfo( 'description' ); ?&gt;&lt;/h2&gt;
        &lt;/a&gt;

        &lt;nav id="site-navigation" class="site-primary-navigation slide-left"&gt;
            &lt;a href="#"&gt;&lt;i class="icon-cancel-circled"&gt;&lt;/i&gt; &lt;span&gt;&lt;?php _e( 'Close', 'jobify' ); ?&gt;&lt;/span&gt;&lt;/a&gt;
            &lt;?php get_search_form(); ?&gt;
            &lt;?php wp_nav_menu( array( 'theme_location' =&gt; 'primary', 'menu_class' =&gt; 'nav-menu-primary' ) ); ?&gt;
        &lt;/nav&gt;

        &lt;?php if ( has_nav_menu( 'primary' ) ) : ?&gt;
        &lt;a href="#"&gt;&lt;i class="icon-menu"&gt;&lt;/i&gt;&lt;/a&gt;
        &lt;?php endif; ?&gt;
    &lt;/div&gt;
&lt;/header&gt;&lt;!-- #masthead --&gt;

&lt;div&gt;

`