Skip Navigation

[Resolved] View Loop Wizard's Bootstrap grid columns are not working

This support ticket is created 2 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 2 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#2183357

I am trying to:
I'm trying to organize this results in 2 columns. I selected columns: 2 in the bootstrap grid but it doesn't work. I tried to change the number of columns and back, but nothing.

I also noticed after adding some css that there is a weird blanc container at the end.

Link to a page where the issue can be seen:
hidden link
I expected to see:
Something like this hidden link
Instead, I got:
hidden link

#2183429

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

From your website's code, I noticed that the Bootstrap library is not loading, which is why its grid/column classes aren't working.

Please go to WP Admin -> Toolset -> Settings -> General and select "Toolset should load Bootstrap 4" option for "Bootstrap loading".

Also, the following custom CSS code from the view will interfere with the Bootstrap's grid/column classes default functionality, so you'll need to remove/adjust it as well.


.col-sm-6 {
    display: flex !important;
    box-shadow: 0px 2px 20px 0px rgb(48 70 89 / 14%);
    padding: 20px;
    border-radius: 22px;
    margin: 40px 0px;
}

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2183903

If I remove that CSS, I will lose the "card style" I'm after. How can I achieve this, then?

#2184567

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for writing back.

I'll recommend the following changes.

1. Currently, your view's loop item output structure is:


<div class="row">
	<div class="col-sm-6">
		<div class="pea-info">
		...
		</div>
		<div class="pea-info">
		...
		</div>
	</div>
	<div class="col-sm-6">
		<div class="pea-info">
		...
		</div>
		<div class="pea-info">
		...
		</div>
	</div>
</div>

I'll recommend including a new div with class "pea-info-card", inside div with the grid column class "col-sm-6":


<div class="row">
	<div class="col-sm-6">
		<div class="pea-info-card">
			<div class="pea-info">
			...
			</div>
			<div class="pea-info">
			...
			</div>
		</div>
	</div>
	<div class="col-sm-6">
		<div class="pea-info-card">
			<div class="pea-info">
			...
			</div>
			<div class="pea-info">
			...
			</div>
		</div>
	</div>
</div>

2. Next, from the custom CSS code, remove the existing code:


.col-sm-6 {
  display: flex !important;
  box-shadow: 0px 2px 20px 0px rgb(48 70 89 / 14%);
  padding: 20px;
  border-radius: 22px;
  margin: 40px 0px;
}

And in its place, include:


.container.wpv-loop > .row {
  margin-bottom: 2%;
}

.pea-info-card {
  display: flex !important;
  box-shadow: 0px 2px 20px 0px rgb(48 70 89 / 14%);
  padding: 20px;
  border-radius: 22px;
  margin: 40px 0px;
  height: 100%;
}

Note: The custom code examples from our forum are shared to get you started in the right direction. You're welcome to adjust them as needed and for more personalized customization assistance, you can consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.