Need function that will return true when viewing the "Event List" page

Home Forums Calendar Products Events Calendar PRO Need function that will return true when viewing the "Event List" page

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1007336
    Bob
    Participant

    I had hoped I’d find my answer here: but the query won’t work for me.

    Problem is on this page: http://crrealtors.org/events/ the default template is pulling the loop so the event content is repeated.

    I’ve updated the theme, tried Event Template, Page template etc…

    I tried 2014 theme and the problem went away so it’s an issue with Builder from iThemes BUT… we have a number of other clients sites, running iThemes Builder without this problem???

    In the iThemes Wiki: http://ithemes.com/codex/page/Builder_Plugin-related_Customizations#The_Events_Calendar there is code for the functions.php but I don’t think this code affects the events list page?

    Maybe it’s right in front of my nose but I’ve tried (tribe_is_events() but that’s not correct.

    What should I test?

    #1007716
    Brook
    Participant

    Howdy Bob,

    That is a good question. The event list page is a bit unique, in that there are two functions for it. One to detect if you are viewing the upcoming List view, and another for the Past view. That’s why in the code you linked you will see this:

    tribe_is_upcoming() || tribe_is_past()

    If one of those is true, you are viewing the event list page. Have you given that code from iThemes a whirl? Does it solve the duplicate issue?

    Cheers!

    – Brook

    #1008083
    Bob
    Participant

    Yes I’m using the code and you’ve confirmed I’m using the correct code and we still have the problem on this site.

    By using this code should we have a new choice for template? The way I read it we set the default using the page ID.

    Can you see anything with your tools that may help?

    #1008561
    Brook
    Participant

    Interesting. Thanks for giving that a whirl.

    I am not completely sure what that code from iThemes does. The tutorial/blog post it links to on our site as the “source” is a bit ancient (for version 2 of the calendar.). We are compatible with Genesis, but the current snippet looks a fair bit different.

    I am not at all certain why you are seeing the duplicates. I would need a copy of the theme to test and try to determine. Would you be willing to provide us a copy of your theme by email it to support @ this website? It is strange that it sounds like you are running the the same theme with Events Calendar Pro on other sites, and not seeing this issue. Hopefully I can reproduce this issue.

    The other possibility is for you to contact iThemes as well. They might be familiar with this issue already.

    Thanks!

    • Brook
    #1008566
    Bob
    Participant

    Yes iThemes is working on this and puzzled as well.

    The ONLY ECPro template I can use is the default events template but then the loop content is added below the events list and basically duplicated content.

    If I choose page or create a custom template in iThemes and use the Function.php code to call this default template, no events load… blank page?

    iThemes Builder has 20+ child themes and yes it’s working on other sites but not this one.

    One somewhat variable is the site having a problem is hosted on WPEngine not standard shared hosting… just in case this makes you think of another idea?

    #1009678
    Brook
    Participant

    Howdy again Bob,

    I am still catching up with all of my threads from this weekend. Please pardon the delayed response.

    Is this a newer version of iThemes builder perchance? Do you have more child themes than usual?

    When you get that blank page are you noticing anything in your error logs? http://wpengine.com/support/how-do-i-access-the-phpapache-error-log-for-my-account/

    I don’t think it’s a WP Engine issue. Their caching system is a bit unique, but that is mostly for DB queries. Same goes for their DB throttles they have in place. We have occassionally had issues there, and worked with the fine folks at WPEngine to resolve them. But something like this is unlikely to be caused by WP Engine’s unique platform in my opinion.

    Let me know about the above questions, or if you have any more questions of your own. Thanks!

    – Brook

    #1010276
    Bob
    Participant

    This reply is private.

    #1010760
    Brook
    Participant

    Thanks for linking to the site. That does help me understand whats going on better. It doesn’t look like you are getting an error, you are just getting an unstyled paragraph of random event text in place of the event page.

    We saw this happen on the Genesis theme a while back. What was happening is that the event page was being rendered as an excerpt instead of a page. When rendered as an excerpt HTML and JS is stripped from the output, and only text remains. Hence the weird block of text.

    Have you changed any settings on this site or your theme relating to excerpts? Have you also double checked that the functions.php file which you added iThemes code to is definitely being loaded? For instance, swap out the line:

    return '4f5363f3cb8e1';

    with:

    echo 'test';

    and see if the word test appears on the event page?

    Thanks again for the link.

    • Brook
    #1011280
    Bob
    Participant

    I just figured out the customer view we have assigned to “archives” in Builder was creating the problem.

    Glad I found the problem but I’m not sure why a view on archives would affect EC Pro?.

    By removing the view from archives I can now use the page or event templates without the extra content at the bottom.

    #1011677
    Brook
    Participant

    Interesting. I could see how that might happen. The Events are Custom Post Type. The Event page is a fairly standard WP Custom Post Type Archive page. It would seem that that the iThemes Archive template is applying to all Archive pages including the events. Perhaps when you specify an archive template and an event template, you have managed to specify two content templates for the same page and thus this duplication happens.

    Thank you very much for sharing the solution Bob. I wish I was able to help you find one much sooner. We do our best to support users of the various highly customized and powerful themes, but since they are usually quite unique it can be difficult to quickly find solutions.

    • Brook
    #1011809
    Bob
    Participant

    To clarify for any others in the future, when you assign a “view” to a Builder template it’s applying another template and loop so you’ll get the event content rendered twice.

    You’ll also be limited to only using the default events template, the page template will be blank.

    Remove the view and the problem goes away.

    That’s all, problem resolved.

    #1012139
    Brook
    Participant

    Thanks for getting back to me and clarifying for future readers. You’re an excellent chap.

    Let us know if you ever need anything else. Cheers!

    – Brook

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Need function that will return true when viewing the "Event List" page’ is closed to new replies.