Skip Navigation

[Resuelto] Shortcode Field Filter Not Working

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

What dose the option "Shortcode attribute" in screenshot mean:

https://cdn.toolset.com/wp-content/uploads/2019/03/1217223-Screen_Shot_2019_03_19_at_11.11.45_AM.png?x12434

Solution:

The option "Shortcode attribute" in your screenshot means attribute of shortcode [wpv-view].

Relevant Documentation:

https://toolset.com/documentation/user-guides/passing-arguments-to-views/#accessing-the-arguments

This support ticket is created hace 5 años, 1 mes. 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Etiquetado: ,

This topic contains 2 respuestas, has 2 mensajes.

Last updated by Sean hace 5 años.

Assisted by: Luo Yang.

Autor
Mensajes
#1217223
Screen Shot 2019-03-19 at 11.11.45 AM.png

Users submit applications through my site. When they do so, I mark each one with the current year (as a single line custom field):

[cred_field field='application-year' post='candidate' value='[currentyear]' urlparam='' class='form-control' output='bootstrap']

Where [currentyear] is a custom shortcode that runs: echo date("Y");

When I create a view and want to filter by the year, I do the following (screenshot attached):

Only that doesn't work. Am I getting the syntax wrong?

I already know a workaround to get the same result, but I can see myself needing something like this in the future, so would like to understand how it's supposed to work.

#1217391

Hello,

The option "Shortcode attribute" in your screenshot means attribute of shortcode [wpv-view], for example:

[wpv-view name="MY-VIEW-NAME" currentyear="2019"]

See our document
https://toolset.com/documentation/user-guides/passing-arguments-to-views/#accessing-the-arguments
section "Accessing the arguments"

#1219336

Ah, that makes sense. Thanks.

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