Hi All,
I need to have all posts (in archives, categories, tags, search, etc) to be sorted by slug. I can achieve that with the following code placed in the archive.php file in the enfold-child:
<?php
// we add this, to show all posts sorted alphabetically by post name (slug) and not title
$posts = query_posts($query_string . '&orderby=name&order=asc&posts_per_page=-1');
?>
When I then display category archive it is sorted by slug (http://coelo.eu/paciorkiewicztest/wp/category/miscellany/).
However when I set up a page with avia builder and use Blog Posts content element this does not work (http://coelo.eu/paciorkiewicztest/wp/compositions/a-orchestral-works/).
Can you please advise in which file I should place my code so that changes are applied to the page with Bog Posts?
many thanks,
Peter
Hi TheElear!
Regards,
Yigit
Hi Yigit,
This is brilliant! Works exactly as I needed! Thanks a lot!
regards,
Peter