7,579 reputation
11448
bio website kathyisawesome.com
location
age
visits member for 3 years, 4 months
seen Oct 17 at 16:35

WordPress and WooCommerce developer. I like writing plugins, making guacamole, having adventures and saving the day.


Oct
11
reviewed Approve suggested edit on When a user registers, create a page from an existing template with their username as the page name
Oct
11
comment Form element deleted from first row of WP_Lists_Table
Fair enough. @toscho mentioned on twitter that it might have to do with the bulk edit form?
Oct
11
comment How to List CPTs Under One Tax Term
You don't need a "page" template as WordPress already has a term archive template (a page on your site that shows all the posts/CPTs in a specific term). See @Anas' answer.
Oct
11
comment Form element deleted from first row of WP_Lists_Table
Still confused as to why it'd be that way only in the first row, but if you will repost your comment about invalid markup as an answer, I will accept it.
Oct
10
comment Form element deleted from first row of WP_Lists_Table
But the nested form is seemingly allowed in the other rows? As well as it appears in the markup. I can do the inputs without forms, but then I got stuck with the enter keypress submitting the whole page, which I'd like to avoid.
Oct
10
asked Form element deleted from first row of WP_Lists_Table
Oct
10
comment Date query not inclusive despite parameter being true
The "inclusive" behavior still doesn't seem totally intuitive to me, but I do understand it now, so thanks for the help.
Oct
10
accepted Date query not inclusive despite parameter being true
Oct
10
comment Date query not inclusive despite parameter being true
It turns out that you can write 'before' => '2014-10-10 23:59:59 directly as the date query parameter since that is a supported date string. If you'll add that, I will accept this answer.
Oct
10
revised Date query not inclusive despite parameter being true
additional info
Oct
10
asked Date query not inclusive despite parameter being true
Oct
8
revised Query by one meta_key and sort by another (possibly NULL value)
added 3 characters in body
Oct
8
comment Query by one meta_key and sort by another (possibly NULL value)
I think that's it. With this in the join clause and the orderby from my previous comment, I am now getting all the null/empty meta key posts at the end of my list, and sorted by date. Thanks so much!
Oct
8
comment Query by one meta_key and sort by another (possibly NULL value)
That is probably the case. Could we treat the non-existing keys the same as the zero-length strings? Based on your last comment: $pieces[ 'orderby' ] = 'ISNULL(MAX(dealer_pm.meta_value)) OR LENGTH(TRIM(MAX(dealer_pm.meta_value))) = 0 ASC, MAX(dealer_pm.meta_value) ASC,' . $wpdb->posts . '.post_date DESC'; is very close. Posts with that meta key come alphabetized at the top, but then there still seems to be a distinction between nulls and zero-length.
Oct
8
comment Query by one meta_key and sort by another (possibly NULL value)
seem to have hit a small hiccup. For some reason there are posts with no "dealer number" before the posts with dealer numbers as well as after. See this screenshot for a better idea. Any idea what is keeping it from displaying all posts with a dealer number and then all the posts where dealer number is null?
Oct
8
revised Query by one meta_key and sort by another (possibly NULL value)
edited title
Oct
8
comment Query by one meta_key and sort by another (possibly NULL value)
Yeah I missed that too. #facepalm! Anyway, I tried your suggestion and it results in zero posts being found. See Bonger's answer... modifying the posts_join and posts_orderby clauses did it.
Oct
7
accepted Query by one meta_key and sort by another (possibly NULL value)
Oct
7
comment Query by one meta_key and sort by another (possibly NULL value)
That works great. I had to modify it to $pieces[ 'orderby' ] = 'ISNULL(MAX(dealer_pm.meta_value)) ASC, MAX(dealer_pm.meta_value) ASC, ' . $wpdb->posts . '.post_date DESC'; so that it would be alphabetized and then go by most recent posts.
Oct
7
comment Query by one meta_key and sort by another (possibly NULL value)
This is almost there! Awesome! For some reason I can't get the posts with a dealer_number key to come first no matter how I set the orderby parameter. Could it be something in the fields parameter? I don't really understand what is going on there.