Wrong Posts on List & Photo View

Home Forums Calendar Products Events Calendar PRO Wrong Posts on List & Photo View

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1015867
    Josh
    Participant

    Hello,

    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

    • This topic was modified 10 years, 6 months ago by Josh. Reason: typo
    • This topic was modified 10 years, 6 months ago by Brook.
    • This topic was modified 10 years, 6 months ago by Brook.
    #1016301
    Brook
    Participant

    Howdy 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

    #1016495
    Josh
    Participant

    I 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.php was invoking get_header(); which was calling header.php of the theme. At the bottom of header.php is a call to mysite_before_page_content(); Then, in framework.php, there are several calls to add_action that add various hooks to the mysite_before_page_content function. One of those hooks is mysite_query_posts which 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_query conflicts 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 in views/default-template.php before the call to get_header():

    remove_action( 'mysite_before_page_content', 'mysite_query_posts' );

    #1016538
    Brook
    Participant

    Wow! That’s some detailed documentation. I will keep this in mind for future users of the Awake theme. Thank you for sharing Josh!

    • Brook
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Wrong Posts on List & Photo View’ is closed to new replies.