• Resolved vinnie2k

    (@vinnie2k)


    I need to change the logo depending on the language.

    I am using polylang and the Spacious theme.

    In the header.php, here’s what I have for displaying the logo:

    <div id=”header-logo-image”>
    ” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><img src=”<?php echo of_get_option( ‘spacious_header_logo_image’, ” ); ?>” alt=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>”>
    </div>

    I would think the important bit is this one:

    <img src=”<?php echo of_get_option( ‘spacious_header_logo_image’, ” ); ?>” alt=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>”>

    Could I do something like this?

    <img src=”<?php
    if(‘fr’ == pll_current_language()) {
    echo “wp-content/uploads/2014/11/Logo.png”;}
    else {
    echo “wp-content/uploads/2015/02/Logo-en.png”;}
    ; ?>” alt=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>”>

    Thank you for your feedback ??

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Hack] Display different logo with different language’ is closed to new replies.