Hello,
I have a category (example - location), in the archive page of that category ( the categories are used both by posts and CPT , called hotels)
I want to display the posts of Hotel CPT, within the category archive template.
Would really appreciate help, with creating this view in toolset.
Thanks.
Hi,
Welcome to Toolset support. Below is the quickest way to show Hotel posts on every category‑archive page, limited to the category being viewed.
1. Make sure Hotels use the same taxonomy
1. Toolset → Post Types → edit Hotel.
2. In Taxonomies to be used with this Post Type tick Categories (or the taxonomy you already use for locations).
3. Update.
2. Create a View that lists Hotels in “this” category
1. Toolset → Views → Add New View.
2. Name it Hotels in current category.
3. Choose Content → Post type = Hotel.
4. In Query Filter click Add a filter → Taxonomy → choose Categories →
Select items with taxonomy → Term set by the current archive page.
5. Design the Loop (title, excerpt, etc.) and Save.
This View now returns Hotel posts whose category term equals the category archive that’s being shown.
3. Insert the View into the category‑archive template
1. Toolset → WordPress Archives → edit the archive named Categories.
2. In the editor place your cursor where the Hotels list should appear.
3. Insert a View Block (or in legacy mode paste the shortcode):
[wpv-view name="hotels-in-current-category"]
4. Save/Update the archive template.
-----------
If you do not see the Toolset > Views menu, you need to enable the legacy mode:
- Go to "Toolset > Settings > General".
- Find the "Editing experience" section.
- Check the "Show both the legacy and Blocks interface and let me choose which to use for each item I build" checkbox.
- Reload the browser page.
- Go to the newly added "Toolset > Views" menu.
- There you will be able to edit the views.
For more information:
https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/
Thanks.
Thanks for your response. Yes i have solved this , during the weekend. But the biggest problem, is I had to forego a FSE theme, to make the site work with toolset. I liked that theme a lot. Toolset views block, archives do not seem to work with FSE themes.
For now, had to shift to one of the recommended themes, by Toolset.
Ardently hope, Toolset team is working on compatbility with FSE themes.
regards
Hi,
Yes unfortunately, we do not have support for the FSE theme.
The problem is that those themes do not use PHP at all, and they all rely on JavaScript.
Toolset is a PHP platform, and it is nearly impossible to port such huge functionality to JS/REST API mode.
If there is a decision to go the route of supporting FSE themes, we will communicate that via email to all of our customers.
Thank you for your understanding.
Thanks Mr. Amirian, for the help.