Skip Navigation

[Resolved] I want to show categories in a view in a row

This support ticket is created 6 years, 1 month 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
- 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/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 6 years ago.

Assisted by: Waqar.

Author
Posts
#1162854
project.png

Tell us what you are trying to do?
I'm building a page for a client who wants to be able to add their own projects to a page, they can now add projects, they also want to be able to categorize each project with a specific category like these: ongoing project, unfinished projects, this years project a.s.o and with this then show all the projects that all have that category on it. The view is outputted to a page and I've used the "Search & pagination" setting to add an option for the users to categorize the projects. The issue I have is that I can only use a: dropdown, radio button & checkbox row option I want to use a simple anchor tag around each category item, can't I display the options with anchor tags in a row instead or am I doing this wrong? I don't want to use a submit button, I want the user to be able to choose the categories just by clicking on them.
Is there any documentation that you are following?
I've tried to follow your YouTube videos and documentation.
Is there a similar example that we can see?
No Haven't found one yet.
What is the link to your site?
We don't have a public one yet.

#1163520

Hi there,

Thank you for contacting us and I'll be happy to assist.

If you'd just like to exclude the need for a "Submit" button, you can remove its code ( [wpv-filter-submit output="bootstrap"] ) from the "Search and Pagination" section and then select the option "Update the View results every time an input changes".
( screenshot: hidden link )

In case, you'd like to present only the link for each category and not the search filtering fields ( e.g. dropdown, radio button & checkbox etc ), You can follow these steps:

1. Create a new taxonomy view ( ref: https://toolset.com/documentation/getting-started-with-toolset/create-and-display-custom-lists-of-content/ ) that is set to show all your categories and in it's Loop editor's settings select "Unformatted" option.

2. In the content template section of this new taxonomy view, you can add following content that automatically generates the link for each category with its title and slug, passed in parameter "wpv-category":


<a href="LINK-TO-PAGE/?wpv-category=[wpv-taxonomy-slug]">[wpv-taxonomy-title]</a>

Note: replace LINK-TO-PAGE with the actual link to the page, where you've added the original view that shows the projects.

3. In your view for projects, remove any existing filters from the "Query Filter" section and add a new one that filters the results based on the category slug, passed through a URL parameter "wpv-category".
( example screenshot: hidden link )

4. You can then insert your newly created taxonomy view on top of the projects view, which will show a list of category terms. Clicking the link will show the same page, but with only the results from the clicked category.

I hope this helps and please let me know if you have any question about these steps.

regards,
Waqar

#1165349

Thank you for your post, but I've still haven't got it working. First the

<a href="LINK-TO-PAGE/?wpv-category=[wpv-taxonomy-slug]">[wpv-taxonomy-title]</a>

seems to not work properly, I've added in the code to the project view for the categories (in the loop item section), but this is the only thing that the inspector is outputting:

<a href="<em><u>hidden link</u></em>"></a>
#1165432

Hi,

Thanks for writing back.

To troubleshoot why the taxonomy slug is not being appended in the URL, I'll need access to the website's admin area.

Can you please share temporary admin login details for the website along with the information on where to find this code?

I've set your next reply as private so that only you and our support team will have access to it.

Important note: Please make a complete backup of the website, before sharing the access details.

regards,
Waqar