Osclass forums

Support forums => Themes => Bender => Topic started by: Adyyda on May 14, 2015, 12:09:03 am

Title: [SOLVED] 3 columns in search
Post by: Adyyda on May 14, 2015, 12:09:03 am
Hello. Can anyone tell me from which file i can change the number of columns in Bender in search page from 4 to 3? Thanks
Title: Re: 3 columns in search
Post by: teseo on May 14, 2015, 12:36:27 am
Hi,

What's your goal, reduce width to accomodate other elements, or have each ad bigger? ???

Regards
Title: Re: 3 columns in search
Post by: Adyyda on May 14, 2015, 12:49:10 am
Hello Teseo. Bigger
Title: Re: 3 columns in search
Post by: Adyyda on May 14, 2015, 12:54:37 am
The setting should be in main.css - nth-child(4n) but is not working. I miss something.
Title: Re: 3 columns in search
Post by: teseo on May 14, 2015, 01:25:56 am
OK, this will give you 3 wider ads in Gallery mode.

1.- In bender/search.php replace:

Code: [Select]
bender_add_body_class('search');
with:

Code: [Select]
bender_add_body_class('user');
2.- Look in you main.css for:

.listing-grid .listing-card{

and change width from 190 to 219px.

Regards
Title: Re: 3 columns in search
Post by: Adyyda on May 14, 2015, 10:42:32 am
Thank you Teseo. Same grid by 3 can be achieved by using bender_add_body_class('home'); 

I have one more question - do you know where is constructed bender_add_body_class('search'); , more precise where is added <li class="listing-card last">
In flynax this was controlled via main css file, by nth-child but here doesn't seem to be the case
Title: Re: 3 columns in search
Post by: teseo on May 14, 2015, 12:14:10 pm
The li element with default "listing-card" class is materially printed in loop-single.php:

Code: [Select]
<li class="listing-card <?php echo $class; if(osc_item_is_premium()){ echo ' premium'; } ?>">
and "last" class is previously added in loop.php:

Code: [Select]
            while(osc_has_items()) {
                $i++;
                $class = false;
                if($i%4 == 0){
                    $class = 'last';
                }

Regards
Title: Re: 3 columns in search
Post by: Adyyda on May 14, 2015, 12:57:15 pm
Thank you for the details
Title: Re: 3 columns in search
Post by: teseo on May 14, 2015, 01:25:59 pm
You're welcome. :) Please add [SOLVED] to the title of this thread.

Regards