Sort posts by custom field from custom table
-
Hello,
I have a custom post type “Person” with many custom taxonomies. One of the taxonomies is “Geburtstag”, the terms look like “1. Februar”, “15. August” etc.
Beyond this, each post of the CTP is using several custom fields, which are saved in a custom table, not in the wp_postmeta!
I would like to sort the posts of the taxonomy terms by using a custom field “geburtsdatum” from the custom table, to sort the data by date of birth.
Unfortunately I don’t know how. I’ve found several code-snippets, but they’re all using the wp_postmeta table. I know, it’s possible to do custom queries with $wpdb, but I don’t know how to hook in the taxonomy function.
Is there a way, to solve this problem, may be even via the functions.php?
Thank you very much in advance for your help!
Andreas
- The topic ‘Sort posts by custom field from custom table’ is closed to new replies.