Home › Forums › Calendar Products › Events Calendar PRO › How to reset query on events list page
- This topic has 11 replies, 2 voices, and was last updated 10 years ago by Barry.
-
AuthorPosts
-
April 10, 2014 at 3:56 am #130527Adrian CumpanasuParticipant
I made a widget for listing todays events. It works well.
In the events list page… instead, it lists the same events as the list’s query,
even if I put reset query before and after the code.here is the code: http://pastebin.com/B5Ma3Q1A
I have stripped down the event’s details for clarityApril 10, 2014 at 7:42 pm #130926BarryMemberHi! Great to see things like custom widgets being built 🙂
Can I ask you to share your code via a service such as Pastebin or Gist, though? The forum by itself isn’t great at handling code and I’m a little worried some of what you posted has been inadvertently stripped out.
April 11, 2014 at 12:14 am #131008Adrian CumpanasuParticipantThanks you! I have edited the post.
April 11, 2014 at 7:35 am #131147BarryMemberOK – can you try adding an eventDisplay property to your query arguments with a value of custom – does that help?
April 11, 2014 at 8:56 am #131180Adrian CumpanasuParticipantThis reply is private.
April 14, 2014 at 11:53 am #132423BarryMemberThat’s right, ‘custom’ is a string literal: can I ask you to share your updated code so I can take a look and see what you are currently using?
April 15, 2014 at 12:23 am #132862Adrian CumpanasuParticipantThis is it.
http://pastebin.com/5hT31g4GApril 15, 2014 at 6:22 am #133046BarryMemberOK, so right now I see:
$events_today = tribe_get_events( array( 'start_date'=>$CurrentDate, 'end_date'=>$CurrentDate ) );
Can you try:
$events_today = tribe_get_events( array( 'eventDisplay' => 'custom', 'start_date' => $CurrentDate, 'end_date' => $CurrentDate ) );
April 16, 2014 at 11:59 am #134084Adrian CumpanasuParticipantthis way it lists only one event that doesn’t make sense.
If you want a backend login I will post it private next.April 16, 2014 at 12:01 pm #134090Adrian CumpanasuParticipantadmin1
provisorioThis way you can see the site
April 16, 2014 at 12:02 pm #134096Adrian CumpanasuParticipantThis reply is private.
April 17, 2014 at 7:54 am #135204BarryMemberWe can’t help too much with custom development questions, I’m afraid. Basically what I wanted to illustrate is that you need to use the custom eventDisplay argument if you want to avoid your own query from being in some aspects “taken over” by the main events query (such as in list view).
We’ll need to leave the rest to you – good luck!
-
AuthorPosts
- The topic ‘How to reset query on events list page’ is closed to new replies.