Tell us what you are trying to do?
I am trying to get search by category to work on my archive by automatically selecting from the dropdown. For this ticket, I am using my dev site: hidden link
What I want it to be able to do is sort the way Visual Portfolio does on my staging site, which allows me to select and sort by selecting the category: hidden link
I would prefer to do this by only using Toolset.
Does Toolset not allow Sort by Category?
Additionally, the default archive page doesn't allow me to style the container, so the dev site looks off: hidden link
How can I create a page for the archive rather than being forced to use the archive template, which is admittedly clunkier than a standard page.
Is there any documentation that you are following?
Yes, but it's not helpful.
Is there a similar example that we can see?
I want to use Toolset to do this: hidden link
This is currently using Visual Portfolio.
What is the link to your site?
Stage: hidden link
Dev: hidden link
Hello,
Q1) Does Toolset not allow Sort by Category?
Toolset WordPress Archive is using WordPress built-in class "WP_Query" to query posts, see WP document:
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
There isn't feature to sort the result by taxonomy, so you can not sort the result by taxonomy(category) in Toolset WordPress Archive.
You might consider to use another custom field instead of taxonomy "category", so you can sort the result by custom field.
Q2) Additionally, the default archive page doesn't allow me to style the container
You can use custom CSS codes to style the WordPress Archive page, for example:
.post-type-archive-projects div.wp-block-toolset-views-wpa-editor{
// here add your custom CSS codes
}
Q3) How can I create a page for the archive rather than being forced to use the archive template, which is admittedly clunkier than a standard page.
The WordPress Archive page is different from normal WordPress page, you can not use normal page instead of WordPress archive page, it will conducts unexpected result, and you can follow WordPress document to customize the archive page template manually, for example, the archive page for custom post types:
https://developer.wordpress.org/themes/basics/template-hierarchy/#custom-post-types
section "Custom Post Types"
Thank you, I was able to solve for #2 and #3.
However, what you suggested for #1 doesn't work. I need the user to be able to filter by project category, and right now doesn't seem to be a way to accomplish that. I attempted a custom field with checkboxes and select, but they only field a sort by.
How can I allow the user to filter by category?
Follow-up: I stumbled onto the solution by allowing a Custom Search > Form Submit > Ajax Refresh when changing any filter. I can hide the submit button using CSS, but how do I move the Category Filter ABOVE the View? There doesn't appear to be an option for this.
Here's the example on Dev: hidden link
Please share your website credentials in below private message box, I need to check it in a live website, thanks
I have tried the credentials you provided above, but get below error message:
LOGIN BLOCKED: 2FA is required to be active on your account. Please contact the site administrator
Please check it, make sure it is valid admin account
I've updated the credentials and shut off 2FA, so you should be good to go.
It is a WordPress Archive page, you just need to setup the custom search form in itself, for example:
1) Edit the WordPress Archvie "Archive for Projects":
hidden link
Find and select the "WordPress Archive" block, enable option "Search", see my screenshot Search.jpg
2) Then follow our document to setup the custom search form:
https://toolset.com/course-lesson/creating-a-custom-search/
I have setup a demo in your website, please test again, check if it is fixed
That works! Thanks for your help on this. I should've said "Filter" rather than "Sort."
I have one last thing - is there a way I am able to set the base link for Project (custom type) Categories (Custom taxonomy) to be nested under /projects/ ?
And, is there a way I can disable an archive for Project Categories such that if a user clicks on the Project Category, they are taken to the Project page but with the respective Category filter applied?
According to our support policy, we prefer one ticket one question
https://toolset.com/toolset-support-policy/
for the new questions, please check the new thread here:
https://toolset.com/forums/topic/two-more-questions-2/