Skip Navigation

[Resolved] Sorting of view

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

Problem:

I can't figure out how to sort all the locations alphabetically based on the post title.

Solution:

You can achieve this by creating a sorting option and setting the default one to sort by title. After that, you can use CSS to hide the sorting control. Follow the steps outlined in this documentation.

You can use the CSS code below to hide the sorting control:

.wpv-sorting-block {
    display: none !important;
}

Relevant Documentation:

https://toolset.com/course-lesson/creating-a-custom-search/#add-front-end-sorting-to-search-results

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.

This topic contains 3 replies, has 2 voices.

Last updated by Christopher Amirian 1 year, 11 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2684937

On this page: hidden link I have created a map, and different locations underneath. That works as I would like it to work.

However, I can't seem to figure out, how to sort all the locations. Right now I can tell it by standard sorts creation time/date, I however would like to have them listed alphabetically - based on the post title - starting with A.

I do not need a sorting Bottom, just a default sorting on title.

Could you please let me know how to achieve this?

#2685064

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

You will need to create a sorting option and then set the default one, after that please get back to us and we will give you the proper CSS code to hide the sort control.

For more information:

https://toolset.com/course-lesson/creating-a-custom-search/#add-front-end-sorting-to-search-results

The default option can be found on the sidebar when you select the sorting control.

Thanks.

#2685246

Perfect, I managed to get the sorting - could you please le me know how to hide the filtering on the page.
Thank you in advance.

Brgds,
Maja

#2685332

Christopher Amirian
Supporter

Languages: English (English )

Hi Maja,

Thanks, now you can add the CSS code below to either your theme option for CSS or the style.css file of your child theme:

.wpv-sorting-block {
    display: none !important;
}

Thanks.