jns120
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
I’m looking for a way to post status updates when the logged-in user writes a post. Similar to status updates when the user makes a comment. Specifically just testing against facebook now. I thought from the information I read that the gigya wordpress plugin/system would do this but so far I only see status updates in FB when I comment, not when I publish a new post.
Forum: Plugins
In reply to: help? – Custom SQL Query. How to ORDER BY two fields?I can’t for the life of me get this working. I actually want to get posts based on category id and also a specific meta value for a meta key called event_date. Then I want to sort by another meta value for a different key called event_time. I thought this should do it but no luck.
$querystr = "SELECT * FROM $wpdb->posts LEFT JOIN $wpdb->postmeta AS eventtime ON($wpdb->posts.ID = $wpdb->postmeta.post_id = eventtime.post_id AND eventtime.meta_key = 'event_time') LEFT JOIN $wpdb->postmeta AS eventdate ON($wpdb->posts.ID = $wpdb->postmeta.post_id = eventdate.post_id AND eventdate.meta_key = 'event_date') LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id) LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) WHERE $wpdb->term_taxonomy.term_id = 8 AND $wpdb->term_taxonomy.taxonomy = 'category' AND $wpdb->posts.post_status = 'publish' AND eventdate.meta_value = $new_date ORDER BY eventtime.meta_value ASC "; $results = $wpdb->get_results($querystr);
Any thoughts?
Viewing 2 replies - 1 through 2 (of 2 total)