Skip Navigation

[Resolved] Different markup for first item of view with Toolset Blocks

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 1 year, 4 months ago.

Assisted by: Minesh.

Author
Posts
#2622483

Tell us what you are trying to do?

I'm creating a View that will list a custom post type. I want the first element of the list to have a different markup than the rest of the list. This way I can show it as a feature, highlighting it.

I have built this using the Toolset View plugin in the past, but I would like to use the new Toolset Block plugin for a new website I'm building.
With Views, I would create something like the following, using [wpv-item index=1]
```
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop wrap="4" pad="true">
[wpv-item index=1]
```

I could not find where I would place the conditions, or similar code with Blocks.
Does Blocks offer a way to enter the code for the loop?

Is there any documentation that you are following?
https://toolset.com/forums/topic/featured-post-in-grid-styled-differently/

What is the link to your site?
hidden link

#2622567

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

You can use the conditional block to compare specific loop index.

Here is the post that shows how you can use conditional block to target specific item of your view's loop using block:
=> https://toolset.com/2021/08/5-advanced-uses-of-toolsets-conditional-block-in-wordpress/#display-additional-information-only-for-the-first-item