Skip to main content
17 events
when toggle format what by license comment
Mar 1, 2011 at 9:13 vote accept Richard Sweeney
Mar 1, 2011 at 9:13
Feb 27, 2011 at 18:59 comment added Richard Sweeney @wyrfel - no worries, thanks so much for your help!
Feb 27, 2011 at 17:30 comment added wyrfel @Richard Sweeney: Argh, then you'll need to use a totally custom query var and add a parse_query filter...sorry, too much for me right now.
Feb 27, 2011 at 17:05 comment added Richard Sweeney @wurfel, shucks... No joy. Removed the code you suggested - also tried lots of variations on bits of code to remove and even removing the entire function. No luck!
Feb 27, 2011 at 16:16 comment added wyrfel @Richard Sweeney: That looks good. Sorry, forgot to mention that you need to remove your $query->set('meta_compare', '>='); line.
Feb 27, 2011 at 11:45 comment added Richard Sweeney @wyrfel yes it does. When I try and filter the results I get the following URL: edit.php?s&post_status=all&post_type=concerts&action=-1&m=0&meta_compare=%3C%3D&paged=1&mode=list&action2=-1
Feb 27, 2011 at 9:40 comment added wyrfel @Richard Sweeney Does it at least bring up the dropdown? (Probably in too many places? ;-) )
Feb 27, 2011 at 8:53 comment added Richard Sweeney @wyfel - thanks for this - it doesn't work 'out of the box'. Unfortunately my PHP and/or WordPress skills really aren't up to scratch to play around with this to make it work. Thanks for all your help anyway, it's much appreciated!
Feb 27, 2011 at 7:03 comment added wyrfel @Richard Sweeney: see edit
Feb 27, 2011 at 6:43 history edited wyrfel CC BY-SA 2.5
added 765 characters in body; added 1 characters in body
Feb 26, 2011 at 15:43 comment added Richard Sweeney @wyrfel I find stack exchange confusing - I'm sure there must be a better way to present different answers or edits and these comments (rather than 'answers') kinda suck! I keep hitting enter by force of pure habit! Might you have time and/or energy to point me in the right direction regarding how to go about constructing a switch statement to toggle views? I'm rather a php/WordPress noob I'm afraid to say! Cheers
Feb 26, 2011 at 15:15 history edited wyrfel CC BY-SA 2.5
deleted 2 characters in body
Feb 26, 2011 at 15:13 comment added wyrfel @Richard Sweeney: Sure you can build a switch that applies a different filter. All depends on how and when you're adding the filter. You can also do both at the same time, i think, if you depend on the new 'meta_query' query value of 3.1, as that allows several meta queries at once, if i get it right.
Feb 26, 2011 at 15:09 comment added wyrfel @t31os I wasn't sure how to best go about it. What's wrong with two answers if they are truely distinct answers? Basically, i decided for a second rather than editing, because it was a very distinct answer and it left the 'comment-story' on the first one intact.
Feb 26, 2011 at 13:53 comment added Richard Sweeney Hang on - it does work! I add $query->parse_query() after all the other query stuff and it now only displays event that have yet to occur! Wicked - thanks so much @wyrfel! --- BTW, any idea if it's possible to toggle the query on the admin side between past and upcoming events?!
Feb 26, 2011 at 13:07 comment added t31os Why not just add that to the original answer?
Feb 26, 2011 at 12:15 history answered wyrfel CC BY-SA 2.5