How To Change The Logo On Specific Pages For Awake 3.6

resolved (4 posts) (2 voices)

  1. Hi,

    Using Awake 3.6 (the latest update)
    Site here: http://workflows.staging.wpengine.com/

    I have had a good look around the support forum regarding how to change the logo on specific pages.
    The logo will be an identical size ... just a different strapline shows ... and so I would like to control which logo image is shown on a page by page basis.

    There are a few threads that are around 1 to 2 years old and so I thought might be "out of date" for the best way to do this.

    Would you be most kind as to advise me on how to go about changing the logo on a page by page basis using the PHP method in the Awake theme i.e. which php files and code at what line would suffice.

    I'd be most grateful. Love the themes.

    Many Thanks, Regards Mark

    Posted 3 years ago #
  2. Elliott
    Support

    Hello workflows,

    Open up /wp-content/themes/[your_theme]/lib/functions/theme.php and on line 848 you should see this,

    if( $logo_url )
    			$logo = '<img src="' . esc_url( mysite_get_setting( 'logo_url' ) ) . '" alt="' . esc_attr( get_bloginfo( 'name' ) ) . '"  />';

    You can use this Wordpress function, http://codex.wordpress.org/Function_Reference/is_page, to check for certain pages and change the URL.

    Posted 3 years ago #
  3. Hi Elliot,
    Thanks for the heads up on that. I'm lacking a little bit of knowledge on how to execute this.

    Using the code you cite at line 848 ...
    The page ID I would like to replace the logo is Page ID 9
    The replacement logo url is: http://workflows.staging.wpengine.com/wp-content/uploads/2014/07/logo-website-smart-phone-research.png

    Would you be most kind as to show me an example and I think I can nail it from there .... I'm just not quite sure what to do with the the line of code you cite and the is_page function.
    I understand that as I would eventually like to do this with multiple pages ... i would use the array code example.

    Thanks for your considered help. Appreciate it.

    Regards Mark

    Posted 3 years ago #
  4. Elliott
    Support

    if (is_page(9)) {
    
    if( $logo_url ) {
    			$logo = '<img src="' . esc_url( mysite_get_setting( 'logo_url' ) ) . '" alt="' . esc_attr( get_bloginfo( 'name' ) ) . '"  />';
    }
    
    }
    
    else if (is_page(10)) {
    
    if( $logo_url ) {
    			$logo = '<img src="' . esc_url( mysite_get_setting( 'logo_url' ) ) . '" alt="' . esc_attr( get_bloginfo( 'name' ) ) . '"  />';
    }
    
    }

    Probably something like this.

    Posted 3 years ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme