Skip Navigation

[Resolved] Need help building a multi-column archive

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.

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

Problem: I would like to create a multi-column design for a WordPress Archive.

Solution: Use Bootstrap's grid system, or add wrapper div elements styled with CSS widths.

<h2>[wpv-post-link]</h2>
<div style="float:left; width:50%;">
[types field='image' alt='%%ALT%%' title='%%TITLE%%' width='400' height='400' align='left' resize='proportional' separator=', '][/types]
</div>
<div style="float:left; width:50%; padding-left: 10px;">
[wpv-post-body view_template="None"]
<label>Client</label> [wpv-post-taxonomy type="client"]<br>
<label>Format</label> [wpv-post-taxonomy type="format"]<br>
<label>Date</label> [types field='dateofpublication' style='text' format='F, Y'][/types]
</div>
<br style="clear:both;" />

Relevant Documentation:
https://getbootstrap.com/docs/3.3/css/#grid

This support ticket is created 7 years ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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 5 replies, has 3 voices.

Last updated by tomG-8 7 years ago.

Assisted by: Christian Cox.

Author
Posts
#583649
archive-page-built-with-toolset.jpg

Hey, folks. I'm new to Toolset and am trying to do something that's probably quite simple: create an archive layout where fields for each item in the loop appear in columns.

Basically, exactly like the image illustrating https://toolset.com/documentation/user-guides/what-archives-are-and-why-they-are-so-important/ (also attached).

Is there a video, or could someone give me a step-by-step? Thanks!

#583749

y.S
#584097
output-results.jpg
edit-image-field-alignment.jpg

Thanks for the response, y.S.. I'm afraid that link didn't help, because it doesn't include information about styling the output into columns.

I was able to make it work in a very basic way by doing the following:

  • Create an archive layout
  • Insert an archive cell
  • In the Loop Output Editor's "Loop Wizard", add my fields (title, image, body)
  • Edit the image field to set its Alignment to left (see attached screenshot)
  • Finish the cell-editing process.

The results are as shown. I suppose I'll further refine it with CSS.

What I was really hoping for was a visual builder within an archive, so I could have more positioning control over the fields besides "left", and so building the loop contents would be easier for a non-coder like me. If this exists, please let me know! (I've left this issue open; if such a solution doesn't exist, feel free to close it.)

Thanks again!

#584191
output-results-bad-runover.jpg

Small followup. I've done a bit of CSS styling... and the attached screenshot shows one of the limitations of the method I described above. (Note how the "Date" field wraps badly when the body text is too long.) I suspect a bit of CSS/shortcode fiddling will help. Any suggestions?

Here's my code:

<h2>[wpv-post-link]</h2>
[types field='image' alt='%%ALT%%' title='%%TITLE%%' width='400' height='400' align='left' resize='proportional' separator=', '][/types][wpv-post-body view_template="None"]
<label>Client</label> [wpv-post-taxonomy type="client"]<br>
<label>Format</label> [wpv-post-taxonomy type="format"]<br>
<label>Date</label> [types field='dateofpublication' style='text' format='F, Y'][/types]

Thanks!

#584334

Hi, you could use CSS on some wrapper div elements to define these columns in the Loop Output:

<h2>[wpv-post-link]</h2>
<div style="float:left; width:50%;">
[types field='image' alt='%%ALT%%' title='%%TITLE%%' width='400' height='400' align='left' resize='proportional' separator=', '][/types]
</div>
<div style="float:left; width:50%; padding-left: 10px;">
[wpv-post-body view_template="None"]
<label>Client</label> [wpv-post-taxonomy type="client"]<br>
<label>Format</label> [wpv-post-taxonomy type="format"]<br>
<label>Date</label> [types field='dateofpublication' style='text' format='F, Y'][/types]
</div>
<br style="clear:both;" />

If you're using Bootstrap in your theme, or if you have told Toolset to load Bootstrap in Toolset > Settings > General, then you can use the Bootstrap grid system:
hidden link

#584471

Many thanks, Christian! I'm not great at CSS -- that's a great idea. I'm sure I'll use it frequently from now on.

Pity there's not a cell-style builder for items inside loops. Hmm... *clickety-click*... there, just proposed it as a feature, at https://toolset.com/forums/topic/add-cell-style-visual-layout-engine-for-within-loops/ . 🙂

The forum ‘Types Community Support’ is closed to new topics and replies.