biainno Posted November 21 Share Posted November 21 hi i'd like to order my blog posts in alphabetical order, rather than by date posted. Is there a code to help with this? I also would like more than 4 columns, preferably 5 in the Blogs page. Link to comment
Ziggy Posted November 21 Share Posted November 21 (edited) This is the plugin you're looking for: https://www.squarewebsites.org/squarespace-plugins/p/universal-filter (referral link) Edited November 21 by Ziggy Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) ✨ Spark Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
biainno Posted November 24 Author Share Posted November 24 hm, is there a way to manually hardcode it though? i tried this, but the formatting of the page is off: <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ if( $('.blog-item').length != 0 ){ var categories = []; $('.blog-item').each(function () { categories.push({ categoryName: $(this).find('.blog-title').html(), listItem: $(this) }); }); categories.sort(function(a,b) { var c = a.categoryName.toUpperCase(); var d = b.categoryName.toUpperCase(); return (c > d) ? 1 : ((d > c) ? -1 : 0); }); $.each(categories, function(index, object){ object.listItem.appendTo(object.listItem.parent()); }); } }); </script> Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment