Home › Forums › Calendar Products › Events Calendar PRO › Need function that will return true when viewing the "Event List" page
- This topic has 11 replies, 2 voices, and was last updated 10 years, 6 months ago by
Brook.
-
AuthorPosts
-
September 21, 2015 at 8:20 pm #1007336
Bob
ParticipantI 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?
September 22, 2015 at 10:09 pm #1007716Brook
ParticipantHowdy 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
September 23, 2015 at 3:43 pm #1008083Bob
ParticipantYes 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?
September 24, 2015 at 4:35 pm #1008561Brook
ParticipantInteresting. 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
September 24, 2015 at 4:45 pm #1008566Bob
ParticipantYes 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?
September 29, 2015 at 7:54 am #1009678Brook
ParticipantHowdy 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
September 30, 2015 at 4:15 pm #1010276Bob
ParticipantThis reply is private.
October 1, 2015 at 10:21 pm #1010760Brook
ParticipantThanks 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
October 4, 2015 at 10:28 am #1011280Bob
ParticipantI 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.
October 5, 2015 at 6:08 pm #1011677Brook
ParticipantInteresting. 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
October 6, 2015 at 4:04 am #1011809Bob
ParticipantTo 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.
October 6, 2015 at 11:43 pm #1012139Brook
ParticipantThanks 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
-
AuthorPosts
- The topic ‘Need function that will return true when viewing the "Event List" page’ is closed to new replies.
