Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #66408
    RB_WP
    Participant

    Hi all, I’ve looked for a while and cannot figure out how to add a second image next to the logo. I am not sure if I have to change the wp-header.php file or use the customizer. Any help would be appreciated. Thank you. I am using WordPress 3.9.1 and the Integrity stack. The URL is beta.starfone.net

    #66786
    Zeshan
    Member

    Hi Daniel,

    Thank you for writing in!

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    You’ll want to copy this file to your child theme: x/framework/views/global/_brand.php

    Then you can add the second image at the bottom. So the code will be something like:

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_BRAND.PHP
    // -----------------------------------------------------------------------------
    // Outputs the brand.
    // =============================================================================
    
    $site_name        = get_bloginfo( 'name' );
    $site_description = get_bloginfo( 'description' );
    $logo             = x_make_protocol_relative( x_get_option( 'x_logo' ) );
    $site_logo        = '<img src="' . $logo . '" alt="' . $site_description . '">';
    
    ?>
    
    <?php echo ( is_front_page() ) ? '<h1 class="visually-hidden">' . $site_name . '</h1>' : ''; ?>
    
    <a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
      <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>
    </a>
    
    <a href="URL_TO_WEBSITE" class="logo-aside-image"><img src="IMAGE_URL" alt=""></a>
    

    Just change the “URL_TO_WEBSITE” with the one you want to point and “IMAGE_URL” to the URL of your uploaded image.

    If you need to style it, you can simply use the “.logo-aside-image” CSS class in Customizer > Custom > CSS, like:

    .logo-aside-image {
       /* Styling goes here */
    }
    

    Hope this helps. If you face any issue, please let us know. We’ll be happy to assist. 🙂

    Thank you.

  • <script> jQuery(function($){ $("#no-reply-66408 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>