Skip Navigation

[Resolved] How to display certain categories using the shortcode?

This support ticket is created 7 years 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 7 replies, has 3 voices.

Last updated by davidR-12 7 years ago.

Assisted by: Minesh.

Author
Posts
#595368

I am using the shortcode 'wpv-view' to display post category terms. Currently it is :

[wpv-view name="ads-filter-category-view" orderby="id" order="asc"]

I want to be able to select certain categories using the shortcode. Is this possible?

Regards,

David

#595370
Screen Shot 2017-12-03 at 17.07.50.png

Hi David, you need to use a filter inside the view itself.

Here's a screenshot of mine.

#595484

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - as I understand, you only want to display selected terms with the view? could you please be more specific with your requirement.

#595492

Hi Minesh,

"Well - as I understand, you only want to display selected terms with the view? could you please be more specific with your requirement."

That is the requirement. But using the shortcode rather than a filter inside the view as I want a client to be able to add categories to the shortcode. Is this possible?

Regards,

David

#595494

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - You should add query filter to your taxonomy view filter by shortcode attribute.

Please check following image:
hidden link

And add taxonomy view as:

[wpv-view name="ads-filter-category-view" orderby="id" order="asc" terms="125,55,88"]

Where:
- Adjust "terms" attribute with your term Ids as you required.

#595579

Hi Minesh,

Is it possible to use term slugs or names or does it have to be IDs?

Regards,

David

#595580

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - you can see all available options when you add term query filter:

See the screenshot:
hidden link

In your case, the suggested way is possible.

#595584

Thats great, thank you