Wordpress: Sort Order by Custom Field for specific Category

/ Published in: PHP
Save to your folder(s)

Put this before the loop in archive.php to have posts in the archive for category '26' sorted by custom field 'date'.
Assign sortable values like '090501' or '2009-05-01' to those fields when editing posts and your Upcoming Events will be sorted by the future date at which they will take place.

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.