Simple question: Is there a way to return a number (serial) for each item returned as a result of a query? In the OUTPUT I'd like to use the number of the item in resulting items from a query.
If there are 10 results I'd like a snip of code to put in the output that gives the # of that item in the result based on the order the query. Example: Let's say I have 20 posts in a CFT called "tour-days" and I've queried them to result in 10 items and want to list them each individually. I'm displaying one result of the ten in 10 different places on a single page using a view using limit="1" and offset"x" (0 through 9). I want the Output to look like this: "Tour Day 1 - Wine Tasting in Napa Valley" (limit="1" offset="0"). In another part of the page I want "Tour Day 2 - The Golden Gate Bridge" (that one is limit="1" offset="2") Is there any way to generate displaying the "1" and "2" in the serialized list?
Is there any documentation that you are following? No
Is there a similar example that we can see? Shown above.
What is the link to your site? This conceptual. Might it use it for food tours on the restaurant review site: hidden link
Thanks
Hello,
There isn't such a built-in feature within Toolset plugin, you will need to setup the value of attribute "offset" manually, or you can setup a custom shortcode for it, see wordpress document:
https://codex.wordpress.org/Function_Reference/add_shortcode