• Hello, first of all, I apologize for my english.
    Well, I want to add a secoundary logo next to the primary logo in my theme. But I have problems positioning it.

    I have this code in header.php for logo:

    <div class="container relative">
                        <div id="logo" class="pull-left">
                            <a href="<?php echo __url( $logo_link ); ?>">
    
                                <?php 
    
                                    /** Destop Logo */
                                    echo "<img ".
                                        cloudfw_make_id( 'logo-desktop' ) .
                                        cloudfw_make_class( cloudfw_visible('desktop', $hide_on_stuck_class) , true) .
                                        cloudfw_make_attribute( array(
                                            'src'           => $logo_image,
                                            'data-at2x'     => $logo_image_retina,
                                            'alt'           => get_bloginfo( 'name', 'display' ),
                                        ), FALSE ) .
                                        cloudfw_make_style_attribute( array(
                                            'margin-top'    => $logo_margin_top,
                                            'margin-bottom' => $logo_margin_bottom
                                        ), FALSE, TRUE )
    
                                    ."/>";
    
                                    /** Tablet Logo */
                                    echo "\n<img ".
                                        cloudfw_make_id( 'logo-tablet' ) .
                                        cloudfw_make_class( cloudfw_visible('tablet', $hide_on_stuck_class) , true) .
                                        cloudfw_make_attribute( array(
                                            'src'           => $logo_image_tablet,
                                            'data-at2x'     => $logo_image_tablet_retina,
                                            'alt'           => get_bloginfo( 'name', 'display' ),
                                        ), FALSE ) .
                                        cloudfw_make_style_attribute( array(
                                            'margin-top'    => $logo_margin_top_tablet,
                                            'margin-bottom' => $logo_margin_bottom_tablet
                                        ), FALSE, TRUE )
    
                                    ."/>";
    
                                    /** Phone Logo */
                                    echo "\n<img ".
                                        cloudfw_make_id( 'logo-phone' ) .
                                        cloudfw_make_class( cloudfw_visible('phone', $hide_on_stuck_class) , true) .
                                        cloudfw_make_attribute( array(
                                            'src'           => $logo_image_phone,
                                            'data-at2x'     => $logo_image_phone_retina,
                                            'alt'           => get_bloginfo( 'name', 'display' ),
                                        ), FALSE ) .
                                        cloudfw_make_style_attribute( array(
                                            'margin-top'    => $logo_margin_top_phone,
                                            'margin-bottom' => $logo_margin_bottom_phone
                                        ), FALSE, TRUE )
    
                                    ."/>";
    
                                    if ( !empty( $logo_image_sticky ) ) {
    
                                        /** Sticky Logo */
                                        echo "\n<img ".
                                            cloudfw_make_id( 'logo-sticky' ) .
                                            cloudfw_make_class( 'show-on-stuck' , true) .
                                            cloudfw_make_attribute( array(
                                                'src'           => $logo_image_sticky,
                                                'data-at2x'     => $logo_image_sticky_retina,
                                                'alt'           => get_bloginfo( 'name', 'display' ),
                                            ), FALSE ) .
                                            cloudfw_make_style_attribute( array(
                                                'margin-top'    => $logo_margin_top,
                                                'margin-bottom' => $logo_margin_bottom
                                            ), FALSE, TRUE )
    
                                        ."/>";
                                    }
    
                                 ?>
                            </a>
    
                        </div><!-- /#logo -->

    I’ve tried to add this in that part of header.php, but the secoundary logo never appear next to my logo. Allways on top or bottom…
    This:
    <div class="logo2"><a href="#" target="_blank"><img src="" width="200" height="50" /></a></div>

    CSS:
    .logo2 { display:block; margin: 10px auto; width: 480px}

    Can you help me please?!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Why not just create a new logo combining both images?

    Thread Starter kassyan_123

    (@kassyan_123)

    Because I want to link them each one to a different site.

    the secoundary logo never appear next to my logo. Allways on top or bottom…

    Then you need to make the containing element wider so the 2nd logo can fit alongside or give the first logo a float:left.

    Thread Starter kassyan_123

    (@kassyan_123)

    The first logo already has a float:left. The second logo is the same size as the first, so there’s enough space for the two logos in the header.
    I do not know where to place the code for that the second logo appears next to the first.

    Try putting it before the closing div tag for #logo and make sure #logo is wide enough to fit both logos side by side.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add 2 logos in header’ is closed to new replies.