Skip Navigation

[Resuelto] Targeting a specific post in the Loop

This support ticket is created hace 4 años, 8 meses. 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.

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
- 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)

Etiquetado: 

This topic contains 1 respuesta, has 2 mensajes.

Last updated by Shane hace 4 años, 8 meses.

Assisted by: Shane.

Autor
Mensajes
#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: Inglés (English )

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

Hi Kenneth,

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

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.