Home › Forums › Calendar Products › Events Calendar PRO › Wrong Posts on List & Photo View
- This topic has 3 replies, 2 voices, and was last updated 10 years, 6 months ago by
Brook.
-
AuthorPosts
-
October 19, 2015 at 9:12 am #1015867
Josh
ParticipantHello,
When I select either the List or Photo view, all of the items shown are not events created in the event calendar but regular posts. This is the view that is loaded at “/calendar/list/?tribe_paged=1&tribe_event_display=list”. Only if I click “Next Events” and then “Previous Events”, then I do get the posts events I created using event calendar pro. If I view the Month view, the calendar shows the correct events and not regular posts.
I am using the latest version of The Events Calendar (3.12.3) and The Events Calendar Pro (3.12.4). What do you suggest?
Thanks
October 20, 2015 at 10:37 am #1016301Brook
ParticipantHowdy Josh,
I would love to help you with that.
It sounds like “conflict” is happening, causing the post type on those views to be altered. We should test for this and narrow it down so we can find the culprit and a possible fix. This guide walks you through how to test for a conflict, and then identify what is conflicting.
Does that all make sense? Please let me know.
Cheers!
– Brook
October 21, 2015 at 6:08 am #1016495Josh
ParticipantI was able to trace it down to a conflict with the Awake 3.2 theme we are using. For the sake of anybody else reading this, the offending call trace follows:
views/default-template.phpwas invokingget_header();which was callingheader.phpof the theme. At the bottom of header.php is a call tomysite_before_page_content();Then, in framework.php, there are several calls toadd_actionthat add various hooks to the mysite_before_page_content function. One of those hooks ismysite_query_postswhich preloads posts to be used in a sidebar, etc.I’m not sure exactly what the conflict is with that function, but my guess is that its use of
global $wp_queryconflicts with that same variable that is used in the nav of Events Calendar. The solution then was to avoid calling that function by putting the following line inviews/default-template.phpbefore the call to get_header():remove_action( 'mysite_before_page_content', 'mysite_query_posts' );October 21, 2015 at 7:07 am #1016538Brook
ParticipantWow! That’s some detailed documentation. I will keep this in mind for future users of the Awake theme. Thank you for sharing Josh!
- Brook
-
AuthorPosts
- The topic ‘Wrong Posts on List & Photo View’ is closed to new replies.
