Archived topic
Centered logo and widgets on its sides
24 replies · Started by Ivan Cazorla on October 18, 2018
Thank you, but I don't want to ad an icon to my menu, I want to add it into my header, which is divided in 3 columns as Leo suggested me. It should go right before the car icon.
How are you adding the cart icon? Just using HTML?
You'd need to make sure Font Awesome is added to your site: https://wordpress.org/plugins/font-awesome/
Then you can add the Font Awesome HTML into the area before the cart icon.
I am using this: https://docs.generatepress.com/article/split-header-three-sections/
And this:
<div class="grid-33 header-left">
[wcas-search-form]
</div>
<div class="grid-33 header-center">
<div class="site-logo">
<a href="<?php home_url( 'inicio' ); ?>" title="DeAcampada" rel="home">
<img class="header-image" src="https://www.deacampada.com/wp-content/uploads/2018/11/new-deacampada.png" alt="DeAcampada" title="DeAcampada">
</a>
</div>
</div>
<div class="grid-33 header-right">
<a href="https://www.deacampada.com/carrito/" class="cart-contents shopping-cart" title="Ver carrito de compra">
<span class="amount"></span>
</a>
</div>
The logo directs to the page inicio which is translated in each different language, I would need to do the same with the cart icon
So in that case, you would enter your Font Awesome icon HTML before this HTML:
<a href="https://www.deacampada.com/carrito/" class="cart-contents shopping-cart" title="Ver carrito de compra">
<span class="amount"></span>
</a>
For example:
<a href="URL GOES HERE"><i class="far fa-facebook"></i></a>
Hi there, the thing is that I don't need to add an icon to the cart link, I need to change the /carrito url as we did with the home logo, so that the url is translated into each language. If not it will always redirect to the spanish cart even though i'm in the french, portuguese or italian domain.
Do you know what I mean?
After that I also need to add another icon next to the cart icon but with the "my-account" page, working on every domain too.
I'm not 100% sure I understand, but perhaps your code would look like this?:
<a href="<?php echo home_url( 'carrito' ); ?>" class="cart-contents shopping-cart" title="Ver carrito de compra">
<span class="amount"></span>
</a>
<a href="<?php echo home_url( 'account' ); ?>"><i class="far fa-facebook"></i></a>
Hi there,
I have this code into my header:
<a href="<?php home_url( 'your-page-slug' ); ?>" title="YOUR SITE NAME" rel="home">
And instead of linking me to the home page, it is only reloading my current page. What am I missing?
thanks,
Ivan
Hmm, instead of:
home_url( 'your-page-slug' );
Try this:
echo home_url( 'your-page-slug' );
Thanks, it's working now!
Awesome, you're welcome :)