Archived topic
Centered logo and widgets on its sides
24 replies · Started by Ivan Cazorla on October 18, 2018
Hi there, I've set my header with a logo and I know you can add widgets to the header but they get aligned to the right. Is there any way to have 1 widget on the left, the logo in the middle and another widget on the right?
Similar to what this website does.
thanks!
Hi there,
This should help: https://docs.generatepress.com/article/split-header-three-sections/
Let me know :)
thanks, I'll check that out!
No problem :)
Hi there, How can I make that the logo links to a ceratin page instead of a link? I have a website with multiple languages on different domains
Hi there,
are you using the Header in Three Sections that Leo linked to?
If so then you can edit the URL in this line:
<a href="URL TO YOUR WEBSITE" title="YOUR SITE NAME" rel="home">
Yes, thank you!
Glad we could help.
Hi, I did that, as you can see here:
<a href="https://www.deacampada.com/" title="DeAcampada" rel="home">
But as I've tried to explain, I have a website with multiple domains, deacampada.com, deacampada.fr, deacampada.it an so on. But the logo in each different domain redirects to the .com domain every single time, instead of going to the home page of each domain in their language.
thanks,
ivan
Same happens with the cart icon on the right.
Are you using a plugin to determine which domain is in use? Something like Polylang or WPML?
Yes, I am using WPML
You could try this:
<a href="<?php home_url( 'your-page-slug' ); ?>" title="YOUR SITE NAME" rel="home">
That will link to yourwebsite.com/your-page-slug
You'll need to make sure "Execute PHP" is checked in the hook.
It works, can I do the same with the cart icon?
I also need to put a my account icon next to the cart icon. Can we do that?
thanks,
Ivan
The cart uses a built-in WooCommerce function to output the cart URL: wc_get_cart_url()
It seems you can filter it:
add_filter( 'woocommerce_get_cart_url', function() {
return get_home_url( 'your-cart-page' );
} );
This should help when it comes to adding icons to your menu: https://docs.generatepress.com/article/adding-icons-to-menu-items/