Skip Navigation

[Resolved] Finishing Off A View To Show A List OF Posts

This support ticket is created 5 years, 10 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
- 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 4 replies, has 2 voices.

Last updated by barryG-4 5 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#1186922

I’m trying things out with Elementor, Elementor Addons and Toolset for the first time and I want to produce a gallery page showing a grid style custom post type list with a featured image and some field data underneath.

Using Toolset views I have created something that looks reasonably like what I need but in a four column grid style, if there are not 4, 8 or 12 posts to display for example, the final row with an odd number in shows the remaining odd numbered posts in a way that fills the space which makes that row’s display look wrong as the images and text boxes are wider and taller than the rows above (if there were rows above……I only have three test posts for now)

Is there a way to set up this view so that it works rather like the Elementor Portfolio module you see below it, or like the Elementor Addon Posts module underneath that so that the empty space is seen in the empty fourth column and therefore all posts in the display are identical in size regardless of whether all four columns have a post in?

I tried using the Elementor Portfolio option and Elementor Addon’s Posts modules but they don’t seem to be able to show the extra field data that the Toolset Views mentor does so I think Views is the right way to do it.

This is the current test page:
hidden link

Many thanks,
Barry.

#1187952

Hi Barry,

Thanks for asking! I'd be happy to help.

To show your view's table based grid similar to the one added by the Elementor plugin's grid, you'll need custom CSS code.

For example, you can add following CSS code in the "CSS editor" tab, below the "Loop Editor" section:
( screenshot: hidden link )


.js-wpv-view-layout.js-wpv-layout-responsive table.wpv-loop.js-wpv-loop,
.js-wpv-view-layout.js-wpv-layout-responsive table.wpv-loop.js-wpv-loop tr td {
border-width: 0px;
}

.js-wpv-view-layout.js-wpv-layout-responsive table.wpv-loop.js-wpv-loop tr td {
width: 25%;
text-align: center;
border-width: 0px;
}

.js-wpv-view-layout.js-wpv-layout-responsive table.wpv-loop.js-wpv-loop tr td img {
width: auto;
max-width: 100%;
max-height: none;
}

@media only screen and (max-width: 860px) {
.js-wpv-view-layout.js-wpv-layout-responsive table.wpv-loop.js-wpv-loop tr td {
max-width: 80%;
border-width: 1px;	
}

.js-wpv-view-layout.js-wpv-layout-responsive table.wpv-loop.js-wpv-loop tr td {
width: 100%;
display: block;
margin: 0px auto 25px;
}
}

The above code will make each gallery item acquire a min-width and will also stack them on top of each other, on smaller screens.

Similarly, you can include additionally custom CSS code, to make the gallery match the styles from the Elementor's portfolio/gallery.
( ref: hidden link )

regards,
Waqar

#1188156

Hi Waqar,

Once again that's perfect. I'm very grateful for the CSS and the screenshot to show where it goes. I'll have to research Toolset and CSS further as I think once I can find out what the names of the classes are need the code, I should be able to try things out without bothering you.

Many thanks,
Barry.

#1188195

Hi Barry,

Thanks for the update and glad my message helped.

The resources shared in this and the previous thread should prove useful in getting familiar with custom CSS code.

For a new question/concern, you're welcome to open a new ticket.

regards,
Waqar

#1204958

My issue is resolved now. Thank you!