Sort Category Page Listings by Custom Field
-
I have a custom field for my pages titled membership_level where it will either be Free or Premium. When you go to the category pages, I want the premium pages to be listed first and then the free pages. I want them to be ordered alphabetically second. This way, you have all premium pages listed from A – Z and then the free pages listed from A – Z.
I have read a lot of forums on this and have seen tidbits of code, but I don’t even know where to start in putting the code to get my pages ordered correctly. I have looked for an “orderby” section in my PHP and can’t seem to find it.
I am using the Clean Retina Theme and I don’t seem to have a categories.php page.
Any help would be greatly appreciated!
- The topic ‘Sort Category Page Listings by Custom Field’ is closed to new replies.