Home>Support>Footer widgets hidden by Polylang still consume space

Footer widgets hidden by Polylang still consume space

I tried just adding a comment on an old thread (https://siteorigin.com/thread/footer-widgets-polylang-plugin/), but there was no response, and you clearly say I should start my own thread anyway, so here I am. (Plus, on my own thread I can give you my Premium #.)

I’m trying to put a widget in the footer of a Vantage-themed site, which internally has a float:left and float:right (a typical look for a footer). The site is bilingual, using Polylang, so I technically have two widgets, one for each language, and Polylang only serves up the one that matches the current locale. But even though only one widget’s markup exists, Vantage makes the width of the {/code] 50%. That's incorrect, squishing the widget into the left half of the layout.

In the old thread, Andrew Misplon suggested forcing the width in CSS, and that seemed to satisfy the OP and one other person that jumped into the thread. But the whole idea of WordPress is that content can be maintained by non-programmers - if someone adds another widget, it won't function until they ask me to change the CSS (they probably won't even know that such a step is necessary, and I may not remember that I put in that hack, or I might not even be the site admin by then). Is there a solution that will properly detect or calculate the number of widgets actually shown?

URL: http://crashjapan.com/

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 6 years, 6 months ago Greg Priday Hi, I Work Here

    Hi OsakaWebbie

    Creating a new thread is always a good way to get much quicker help. I’ll have our technical team write up some custom CSS for your specific situation. I’ll post it here as soon as they’re done.

    I’ve also logged this as a bug in our issue tracker. You’re right, ideally Vantage should be detecting this properly. Hopefully we can get compatibility into the next release.

  2. 6 years, 6 months ago OsakaWebbie

    Thank you. I suspect it’s not possible with just CSS, but I’m using a child theme and already have a functions.php, so you can write something for a hook that goes there if you like. Or if you come up with the actual bug fix that goes in widgets.php (I suspect that’s where the problem is), I can spawn a child version of that file to cover until the fix is in Vantage itself.

  3. 6 years, 6 months ago Greg Priday Hi, I Work Here

    Hi OsakaWebbie

    Can you try this CSS and see if it does the trick for you?

    /* Footer */
    
    body:lang(en) #footer-widgets .widget {
    	width: 100%;
    }
    
  4. 6 years, 6 months ago OsakaWebbie

    That’s basically the same hack suggested on the other thread (https://siteorigin.com/thread/footer-widgets-polylang-plugin/). That, coupled with a second one for Japanese (like the other thread’s OP added for Italian) does work, but only as long as the number of widgets in the footer is always one per language. Hard-coding it like that prevents the theme from adjusting with content changes – if my site’s content folks decide to add another widget, the footer will fall apart (the two will stack instead of being side-by-side). In fact, in the process of experimenting, I discovered that it’s probably better for my two divs to be in separate widgets, so that others can put something in the center if they want. Yes, I know I can set the width to 50% for two, and if someone adds a third one I can change it to 33%, but the theme should be able to do that automatically.

  5. 6 years, 6 months ago Greg Priday Hi, I Work Here

    Hi OsakaWebbie

    We’ll definitely still be fixing this issue in the long run, but we do like to provide fixes while these things are going through the development cycle.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More