Skip Navigation

[Resolved] Feature post to display only on first page

This support ticket is created 4 years, 8 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.

This topic contains 2 replies, has 2 voices.

Last updated by emilyT 4 years, 8 months ago.


Hi folks

I've used your article here to set a featured post on the news archive which display differently to the rest of the posts. You can see it in action here:
hidden link

If you move to the second page of results (hidden link) the first post is featured here as well. I'd would like to adjust this so that the feature only displays on the first page of results and subsequent pages have just the three-column layout, is that possible?

This is how my loop looks:
[wpv-item index=1]
<li class="col3">
<a href="[wpv-post-url]">[wpv-post-featured-image size="full"]</a>
<div class="topcontent"><h2>[wpv-post-link]</h2>
<p class="meta">[wpv-post-date] - [wpv-post-taxonomy type="category"]</p>

[wpv-item index=other]
<li class="col1">
<a href="[wpv-post-url]">[types field="one-column-image"][/types]</a>
<p class="meta">[wpv-post-date] - [wpv-post-taxonomy type="category"]</p>


Many thanks, Emily


The Loop will iterate over each set of items that you have on each page.

If you have a code in your loop that features the first post, for example, this will run in each loop iteration and hence be the same logic on all pages.

What you can try is to use an HTML condition, in where you check the current page, and conditionally display featured code or just the standard grid.

Simplified, this looks like this:

          		[wpv-item index=1]
          			[wpv-conditional if="( '[wpv-pager-current-page]' eq '1' )"]
                      This HTML is used if we are on the first page and first item
          			[wpv-conditional if="( '[wpv-pager-current-page]' ne '1' )"]
                      This HTML is used for the first item on any other page
          		[wpv-item index=other]
                      This HTML is used for all other items no matter the page

You can read more about conditional HTML here:

The ShortCode for the current page is explained here:


Thanks Beda, that works perfectly!

Thanks again, Emily