Skip Navigation

[Resolved] View shortcode attribute with Blocks and Archive

This thread is resolved. Here is a description of the problem and solution.

Problem:
How can we insert a View using Blocks passing a ShortCode Query Attribute to the View?

Solution:
That's not possible with Blocks.
This is possible only if you insert the actual ShortCode of the View and use the "Fields and Views" GUI of Toolset in, for example, a classic block, instead of using a View Block.

You'd can to request such feature at https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

This support ticket is created 4 years, 9 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 2 replies, has 2 voices.

Last updated by umbertoZ 4 years, 9 months ago.

Assisted by: Beda.

Author
Posts
#1542021
Captura.PNG

Hi, I'm working with Toolset Blocks. I've created an archive page and there I've added a query filter by a custom field. I'd like to pass the value by a shortcode attribute, but it seems it is not possible.

So I decided to create a view and insert it in a block in the Archive page. There I can add the Custom field value, but if I use a shortcode it also doesn't work (I attach a capture).

I tested it on a classic editor where it works fine:

[wpv-view name="questions" wpvcompany="[types usermeta='user-company' user_current='true'][/types]"]

Is it possible to make this works in a block and in an Archive page without coding?

thanks

#1542999

That's not possible, correct.

You'd have to request it at https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

You can (or, should) use the Classic Views Editors for this option and to insert it somewhere, use any classic editor, or Text and fields block, or similar

#1545389

My issue is resolved now. Thank you!