Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Custom widget area widths (http://forum.bytesforall.com/showthread.php?t=22576)

gr870sfunk Jun 17, 2014 03:22 PM

Custom widget area widths
Is it possible to do the custom widget width as a percentage like below or does it have to be in pixels?

HTML Code:

<?php bfa_widget_area('name=Logo Header&cells=2&align_1=9&align_2=9&width=60%&width_2=40%'); ?>

juggledad Jun 17, 2014 06:04 PM

As is...no, but with a little code change it could happen. The code would have to be changed to check for a '%' or a 'px' and use them instead of the way it currently works. And the documentation would have to be rewritten. Coding, testing and documentation would probably take 2hrs of time.

gr870sfunk Jun 19, 2014 11:41 AM

Well since the client didn't pay for a responsive site, i'll stick to the pixel widths. However, it is good to know that I can custom "fix" it, if necessary.

Thanks JD!

KMJ Aug 16, 2014 04:26 AM

By the way, I've just spent a frustrating time trying to get the widget widths set because I didn't realise it had to be "width_1=200px" and not "width_1=200"! Can you clarify this in your "Add new widget areas" page to help others.
Just a minor point, thanks.

juggledad Aug 16, 2014 07:28 AM

Tis will be fixed in 3.7.18 to the effect so you can use 'px' or '%' and if you don't use either, it will default to 'px'.

For example if you have
PHP Code:


they will both use 'px'. if you have
PHP Code:


width_1 will be 25px and width_2 will be 40%
note: if there are only 2 cells, then cell 2 will be the width of the page - 25px (width 1)
note: if there are 3 cells, then cell 2 will be the 40% of width of the page - 25px (width 1)

there will be some added documentation on screen for this too.

All times are GMT -6. The time now is 08:19 AM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.