Skip Navigation

[Resolved] Targeting a specific post in the Loop

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

Our next available supporter will start replying to tickets in about 4.06 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Shane 5 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#1295025

I'm attempting to target a single post in the loop using wpv-item shortcode.
I'm querying a CPT (Ingredients) that are related to a Post in a many-to-many relationship. I'm querying alphabetically by Title of post, ascending.
My code is as follows:
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-item index=1]
[calculate round="2"][types field='cup-weight-ing' output='raw'][/types]*[types field='quantity-1' item='@post-and-ingredient.parent'][/types]*[types field="carbohydrates-ing" output="raw"][/calculate]
</wpv-loop>
<!-- wpv-loop-end -->
The product of those three fields in this View is 630. When I display the View on that Post it display 1260 (it is doubling the correct amount). What am I doing wrong?
Thanks

#1295065

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kenneth,

You can respond to this ticket here when you're ready.