Skip Navigation

[Resolved] Only display one item in search results

This support ticket is created 4 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 1 reply, has 2 voices.

Last updated by Christian Cox 4 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#1937999

Question 1: I applied this code under my results page 1
[wpv-view name="view-slug" view_display="layout"]

but I need only one result to be shown,

#1938029

but I need only one result to be shown,
Use the "limit" attribute to show only the first result:

[wpv-view name="view-slug" view_display="layout" limit="1"]

Documentation for the wpv-view shortcode is available here:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-view