Skip Navigation

[Resolved] Taxonomie – Checkboxes – Layout / Picture show as lightbox

This thread is resolved. Here is a description of the problem and solution.

Problem: I have a taxonomy filter that is shown using checkboxes. I would like to display those filters in several columns instead of one long list.

Solution:
Here's an example of adding a CSS class to a div wrapping the taxonomy shortcode:

<div class="form-group">
<label>[wpml-string context="wpv-views"]Nationality[/wpml-string]</label>
<div class="four-columns">
  [wpv-control-post-taxonomy taxonomy="nationality" type="checkboxes" format="%%NAME%%" orderby="none" url_param="wpv-nationality"]
</div>
</div>

Then you would add this code to the CSS panel below your View's Search and Pagination editor:

four-columns {
  -webkit-column-count: 4; /* Chrome, Safari, Opera */
  -moz-column-count: 4; /* Firefox */
  column-count: 4;
}
This support ticket is created 5 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 2 voices.

Last updated by reimundH 5 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#1239593
frontend.png

Dear Lady or Sir,

I´ve created a custom search with checkboxes. The checkboxes are connected with taxonomies. Please check the attached screenshot.
How I can show the checkboxes as columns. I this case I´d like to show 4 columns (5 CB / 5 CB / 5 CB / 5 CB)

Another question:
The search results are shown a picture per result. I´d like to have the following function. If click on the picture, it will open the picture in a bigger size as lightbox.

Thank you in advance.

Best regards
Reimund

#1239598

How I can show the checkboxes as columns. I this case I´d like to show 4 columns (5 CB / 5 CB / 5 CB / 5 CB)
You can wrap the checkboxes filter shortcode in a div, then apply custom CSS to display content in multiple columns. More information about CSS column-count: https://www.w3schools.com/cssref/css3_pr_column-count.asp

The search results are shown a picture per result. I´d like to have the following function. If click on the picture, it will open the picture in a bigger size as lightbox.
There's nothing built-in to Toolset that will open an image in a lightbox. This requires custom code using JavaScript and CSS, or another 3rd-party Lightbox plugin. There are several other tickets here in the forum where other users have shared their solutions for lightbox displays. Here's one where Beda offers some code samples: https://toolset.com/forums/topic/using-a-lightbox-in-my-view-to-display-view-content-template/

If you need more specific information, feel free to create a separate ticket. Our support policy is one topic per ticket, so we can keep the forums organized. Thanks!

#1239599

Hello Christian Cox,

thank you for your very fast reply.
Is it possible that you show me a example based on my code. Because I not a programmer and I am not sure what I have to do.

<div class="form-group">
<label>[wpml-string context="wpv-views"]Nationality[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="nationality" type="checkboxes" format="%%NAME%%" orderby="none" url_param="wpv-nationality"]
</div>

Many thanks.

Best regards
Reimund

#1239600

Here's an example of adding a CSS class to a div wrapping the taxonomy shortcode:

<div class="form-group">
<label>[wpml-string context="wpv-views"]Nationality[/wpml-string]</label>
<div class="four-columns">
  [wpv-control-post-taxonomy taxonomy="nationality" type="checkboxes" format="%%NAME%%" orderby="none" url_param="wpv-nationality"]
</div>
</div>

Then you would add this code to the CSS panel below your View's Search and Pagination editor:

.four-columns {
  -webkit-column-count: 4; /* Chrome, Safari, Opera */
  -moz-column-count: 4; /* Firefox */
  column-count: 4;
}
#1239602

My issue is resolved now. Thank you Christian!