frequently asked question
Jun 15, 2022

How can I use CMS Combine and CMS Sort together to sort on page load?

This can be achieved with a little custom JS, basically follow these steps:

1. Add the CMS Sort script after the CMS Combine script

2. Set up the sort attribute using this docs https://www.finsweet.com/attributes/cms-sort/

3. Set the sort button to display:hidden and give it a unique class name(ie. sort-on-load). Add the script below before the </body> tag

window.onload=function(){

document.querySelector(".sort-on-load").click();

}

Check more questions and answers

cmssort
cmsfilter
Jun 15, 2022

How can I use CMS Combine and CMS Sort together to sort on page load?

This can be achieved with a little custom JS, basically follow these steps:

1. Add the CMS Sort script after the CMS Combine script

2. Set up the sort attribute using this docs https://www.finsweet.com/attributes/cms-sort/

3. Set the sort button to display:hidden and give it a unique class name(ie. sort-on-load). Add the script below before the </body> tag

window.onload=function(){

document.querySelector(".sort-on-load").click();

}

false
false
Go to FAQ page
Subscribe

Sign up for future releases!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.