Site logo

Archived topic

Primary navigation with logo right align

21 replies · Started by Verónica on March 20, 2018

Viewing posts 16–22 of 22

Sorry to hear that! Never easy.

Replace this function:

function tu_custom_wc_cart_link() {
    ob_start();
    ?>
    <a>cart->get_cart_url() ); ?>" class="cart-contents" title="<?php esc_attr_e( 'View your shopping cart','generate-woocommerce' ); ?>">
        <?php _e( 'Cart','generate-woocommerce' );?> - <?php echo sprintf ( _n( '<span class="number-of-items">%d</span> item', '<span class="number-of-items">%d</span> items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?>
    </a>
    <?php
    return ob_get_clean();
}

With this:

function tu_custom_wc_cart_link() {
    ob_start();
    ?>
    <a href="<?php echo esc_url( WC()->cart->get_cart_url() ); ?>" class="cart-contents" title="<?php esc_attr_e( 'View your shopping cart','generate-woocommerce' ); ?>">
        <?php echo sprintf ( _n( '<span class="number-of-items">%d</span>', '<span class="number-of-items">%d</span> items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?>
    </a>
    <?php
    return ob_get_clean();
}

Thanks! I think maybe there's something missing, because the result is the following

https://imgur.com/FDV0sx4

Apologizes for bodering you so much! I promise to do a php course in the future!!

I'm seeing it - perhaps try clearing your browser cache.

However, you seem to have some CSS that's causing the page to be super wide, which is causing horizontal scroll.

Thanks so so much Tom!!! You're help and support is amazing! Have a nice weekend!

Thank you!! I'm glad you got it sorted! :)

This archived topic is closed to new replies.