Jump to content

Moving the Weglot widget to the top of the page

Recommended Posts

Hey there,

You can use the language switcher visual editor (new feature!) to change the position of the language switcher (Settings > Language Switcher > Visual Editor). You can also check our support documentation to learn how to change the position of the language switcher via other methods.

Hope this helps but don't hesitate to reach out to us at support@weglot.com if you need any help with it!

Link to comment
  • 1 year later...
On 9/11/2023 at 2:41 AM, DreamrW said:

Hi Tuan, 

I want to do the same - I want to move the language selector to sit to the left of the Cart on desktop, and at the bottom of the menu on mobile. Can you help? 🙏

https://www.weddingalbums.ie/

 

 

 

Move this?

image.thumb.png.69d684e7116daf448ef313dabe8306d4.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 9/16/2023 at 9:24 PM, DreamrW said:

Yes please Tuan! 

Try Website > Website Tools > Custom CSS
 

/* WeGlot position */
.wg-default, .wg-default .country-selector {
    bottom: unset !important;
    top: 30px;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
3 hours ago, tuanphan said:

Try Website > Website Tools > Custom CSS
 

/* WeGlot position */
.wg-default, .wg-default .country-selector {
    bottom: unset !important;
    top: 30px;
}

 

Thanks Tuan. That works perfectly on desktop but on mobile it hides the burger menu. See screen shot. 

Is there a workaround for mobile? 

IMG_2820.PNG

Link to comment
On 9/18/2023 at 2:16 PM, DreamrW said:

Thanks Tuan. That works perfectly on desktop but on mobile it hides the burger menu. See screen shot. 

Is there a workaround for mobile? 

IMG_2820.PNG

What should it look like on mobile? Or you can use this code to move WeGlot on desktop only

@media screen and (min-width:992px) {
/* WeGlot position */
.wg-default, .wg-default .country-selector {
    bottom: unset !important;
    top: 30px;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
4 hours ago, tuanphan said:

What should it look like on mobile? Or you can use this code to move WeGlot on desktop only

@media screen and (min-width:992px) {
/* WeGlot position */
.wg-default, .wg-default .country-selector {
    bottom: unset !important;
    top: 30px;
}
}

 

Perfect Tuan! 

Is it possible to fix the weglot widget to scroll back with the menu? 😬

Link to comment
  • 2 weeks later...

Add to bottom of Code Injection > Footer

<script>
   $(window).scroll(function(){
  var scroll = $(window).scrollTop();
  if(scroll > 150){
    $('div.weglot-container').addClass('hide');
  }
  else{
    $('div.weglot-container').removeClass('hide');
  }
});
</script>
<style>
  .hide {
    visibility: hidden !important;
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 10/7/2023 at 10:20 AM, tuanphan said:

Add to bottom of Code Injection > Footer

<script>
   $(window).scroll(function(){
  var scroll = $(window).scrollTop();
  if(scroll > 150){
    $('div.weglot-container').addClass('hide');
  }
  else{
    $('div.weglot-container').removeClass('hide');
  }
});
</script>
<style>
  .hide {
    visibility: hidden !important;
}
</style>

 

Smashing, thanks once again Tuan!

 

Link to comment
  • 2 weeks later...

Hello Tuanphan, 

I don't know how to move the weglot button to the right just below the last menu item (REACH OUT).

Website: www.hellocinnamon.com

Currently, I am split navigation code that allows divided menu items with the logo in the middle. 
 

===================================
    SPLIT NAVIGATION STYLING
===================================
*/
@splitAfterItem: 4;
@actionSize: 1px; 
@logoSpacing: 1vw;

//Width at which nav will stack
@media screen and (min-width:1200px) {
  
//Dynamic Nav font size
#header .header-nav-item {
  font-size: clamp(8px,calc(~".6vw + 5px"),18px);
}

//Split Structure
#header .header-layout-branding-center-nav-center .header-display-desktop .header-title-nav-wrapper {
  display: grid;
grid-template-columns:1fr auto 1fr;
  .header-nav,.header-title {
    grid-row-start: 1;
  }
  .header-nav { margin-top: 0; }
  .header-nav-item a {
    opacity: 0;
    transform: none!important;
    transition: opacity .3s linear;
  }
  &.has-nav .header-nav-item a{opacity:1!important;}
.header-title{grid-column-start:2;}
@splitOne: @splitAfterItem + 1;
.header-nav:first-child .header-nav-list > div:nth-child(n +@{splitOne}) {display: none;}
.header-nav:not(:first-child) .header-nav-list > div:nth-child(-n +@{splitAfterItem}){display:none;}
//Left side nav
.header-nav:first-child {
  display: block;
  text-align: right;
  margin-right: @logoSpacing;
  .header-nav-list {
    justify-content: flex-end;
  }
}
//Right side nav
.header-nav:not(:first-child) {
  text-align: left;
  margin-left: @logoSpacing;
.header-nav-list{justify-content:flex-start;}
}}}
//Give nav more width
#header .header-layout-branding-center-nav-center .header-display-desktop {
  .header-title-nav-wrapper {
    flex: 0 0 calc(~"100% - @{actionSize} * 2");
  } 
.header-actions{
  width:@actionSize;
  flex: 0 1 @actionSize;
  max-width: @actionSize;
  }
  //hide left side nav when stacked
.header-nav:first-child {
  display: none;
}
}

.header-title-logo a {
    max-height: unset !important;
}
/*
===================================
    end SPLIT NAVIGATION STYLING
===================================
*/

Thanks in advance. 
 

Link to comment
On 10/20/2023 at 4:11 AM, Mary_DG said:

Hello Tuanphan, 

I don't know how to move the weglot button to the right just below the last menu item (REACH OUT).

Website: www.hellocinnamon.com

Currently, I am split navigation code that allows divided menu items with the logo in the middle. 
 

===================================
    SPLIT NAVIGATION STYLING
===================================
*/
@splitAfterItem: 4;
@actionSize: 1px; 
@logoSpacing: 1vw;

//Width at which nav will stack
@media screen and (min-width:1200px) {
  
//Dynamic Nav font size
#header .header-nav-item {
  font-size: clamp(8px,calc(~".6vw + 5px"),18px);
}

//Split Structure
#header .header-layout-branding-center-nav-center .header-display-desktop .header-title-nav-wrapper {
  display: grid;
grid-template-columns:1fr auto 1fr;
  .header-nav,.header-title {
    grid-row-start: 1;
  }
  .header-nav { margin-top: 0; }
  .header-nav-item a {
    opacity: 0;
    transform: none!important;
    transition: opacity .3s linear;
  }
  &.has-nav .header-nav-item a{opacity:1!important;}
.header-title{grid-column-start:2;}
@splitOne: @splitAfterItem + 1;
.header-nav:first-child .header-nav-list > div:nth-child(n +@{splitOne}) {display: none;}
.header-nav:not(:first-child) .header-nav-list > div:nth-child(-n +@{splitAfterItem}){display:none;}
//Left side nav
.header-nav:first-child {
  display: block;
  text-align: right;
  margin-right: @logoSpacing;
  .header-nav-list {
    justify-content: flex-end;
  }
}
//Right side nav
.header-nav:not(:first-child) {
  text-align: left;
  margin-left: @logoSpacing;
.header-nav-list{justify-content:flex-start;}
}}}
//Give nav more width
#header .header-layout-branding-center-nav-center .header-display-desktop {
  .header-title-nav-wrapper {
    flex: 0 0 calc(~"100% - @{actionSize} * 2");
  } 
.header-actions{
  width:@actionSize;
  flex: 0 1 @actionSize;
  max-width: @actionSize;
  }
  //hide left side nav when stacked
.header-nav:first-child {
  display: none;
}
}

.header-title-logo a {
    max-height: unset !important;
}
/*
===================================
    end SPLIT NAVIGATION STYLING
===================================
*/

Thanks in advance. 
 

Try this CSS code

.header-actions.header-actions--right {
    position: absolute;
    right: 0;
    bottom: -10px;
}

image.png.231120405b5c6d78e2c11cc6de3d3354.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.