No, no, for free .
EDIT:
You can install this script in a theme component.
It arranges the items of the categories list only on the page itself.
This doesn’t affect any template or internal to keep better compatibility.
Depending on your theme, it might require adjustments.
Let me know if it works for you.
js
<script type="text/discourse-plugin" version="0.8">
api.onPageChange((url, title) => {
const { defaultHomepage } = require('discourse/lib/utilities');
if (url !== '/categories' && (url !== '/' || defaultHomepage() !== 'categories')) {
return;
}
const desktop_category_page_style = api.container.lookup('service:site-settings').desktop_category_page_style;
const sort = ({parent, nodes, selector}) => {
if (!parent || !nodes.length) {
return
}
Array.from(nodes).sort((a, b) => {
const valueA = a.querySelector(selector).textContent;
const valueB = b.querySelector(selector).textContent;
return valueB - valueA;
})
.forEach(row => parent.appendChild(row));
}
if (desktop_category_page_style.startsWith('categories')) {
const parent = document.querySelector('.category-list tbody[aria-labelledby="categories-only-category"]');
sort({
parent: parent,
nodes: parent?.querySelectorAll('tr'),
selector: 'td.topics span.value'
})
}
else if (desktop_category_page_style === 'subcategories_with_featured_topics') {
const childs = document.querySelectorAll('table.category-list');
sort({
parent: childs[0]?.parentElement,
nodes: childs,
selector: 'th.parent-category span.value'
})
} else {
// boxes doesn't have a count displayed
}
});
</script>