Home › Forums › Calendar Products › Events Calendar PRO › Amend query in list.php
- This topic has 4 replies, 2 voices, and was last updated 13 years, 5 months ago by
Barry.
-
AuthorPosts
-
October 30, 2012 at 1:09 am #27344
Stefhan
ParticipantHi, I’ve been trying to get the ECP plugin to show only one instance of recurring events in list view (see https://theeventscalendar.com/support/forums/topic/recurring-events-problem-2/#post-26355). I’ve managed to figure out how to query the database to achieve what I’m after, but when I try to apply this to the query in list.php it doesn’t return anything – the page is blank. I tried using query_posts and WP_Query but both returned nothing.
Can someone explain how to amend the query in list.php? I’ve pasted the code I’ve tried in Pastebin: http://pastebin.com/R4i5NMVM.
Many thanks
October 31, 2012 at 6:10 am #27389Barry
MemberHi Stefhan: I can pretty much run the same query locally (at the top of the list.php template) and I still see events, it doesn’t result in a blank page.
I’m guessing you’re not actually passing date as you have done in your paste and that’s just to give us a general idea of what you are doing … or have you actually defined this as a constant?
November 6, 2012 at 3:29 pm #27630Stefhan
ParticipantThanks Barry – I’ve taken out the date bit but still can’t seem to make it return anything. I’ve tried every permutation I can think of but with no luck – the page loads but gives up when it gets to the query.
I’ve created a new paste here: http://pastebin.com/2vLiP6HM – could you tell me where I’m going wrong?
thanks!
November 6, 2012 at 3:47 pm #27632Barry
MemberHey Stefhan.
No problem – if I use this code http://pastebin.com/0YAsSvs1 (the only real change to your code is it echoes out titles of events) it runs without any problems.
I’m guessing you do have published events – so if you aren’t seeing anything then I can only guess that it is something to do with the context in which your code is running.
Are you testing this out in isolation or might various other queries be running before and after this one? Have you shut down other plugins / changed to a default theme for testing purposes?
November 8, 2012 at 2:52 pm #27732Barry
MemberStefhan, I’m not sure there is going to be a huge amount of further support we can offer up for what is after all custom code – but I just wanted to check if you had any more questions relating to this that I might be able to help with before closing the thread?
-
AuthorPosts
- The topic ‘Amend query in list.php’ is closed to new replies.
