Sort by meta, missing post
-
I just finished a site conversion from HTML to WordPress, and am using this plugin for controlling the sort order of the custom taxonomies. There are 5. It is working fine, except for one little thing.
Three of the 5 are set to use the post slug for sort. The other two are using a post meta field (year). My client added two new posts, and clicked on the taxonomy links on the post. The ones with slug work, but the ones with year did not show the new post in the list of posts.
I was baffled, and went to look at the posts. It turns out that the client (new to WordPress) did not put the post meta fields in the new posts, so there was no year. Once I put that in, the posts then showed up in the list at the taxonomy link.
The question for you is: why does the sort field affect whether the post is in the list? The query is such that the post is not selected if it doesn’t have the sort criteria? I suppose I can see how that might be for a JOIN for the meta values. Is there another way to get the query to work if the meta field is missing? The post should be in the list, but not sorted.
- The topic ‘Sort by meta, missing post’ is closed to new replies.