Advertisement:

Author Topic: [SOLVED] 3 columns in search  (Read 1690 times)

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
[SOLVED] 3 columns in search
« 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
« Last Edit: May 14, 2015, 01:42:01 pm by Adyyda »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: 3 columns in search
« Reply #1 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

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Re: 3 columns in search
« Reply #2 on: May 14, 2015, 12:49:10 am »
Hello Teseo. Bigger

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Re: 3 columns in search
« Reply #3 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.

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: 3 columns in search
« Reply #4 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

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Re: 3 columns in search
« Reply #5 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

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: 3 columns in search
« Reply #6 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

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Re: 3 columns in search
« Reply #7 on: May 14, 2015, 12:57:15 pm »
Thank you for the details

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: 3 columns in search
« Reply #8 on: May 14, 2015, 01:25:59 pm »
You're welcome. :) Please add [SOLVED] to the title of this thread.

Regards