Home › Forums › Calendar Products › Events Calendar PRO › Adding Custom Field to Month View Breaks the Mobile Calendar
- This topic has 10 replies, 2 voices, and was last updated 9 years, 6 months ago by Brook.
-
AuthorPosts
-
September 13, 2014 at 8:36 am #741783Anthony D’ArcoParticipant
I am trying to add my custom field to the grid view. I copied your file and and placed it here: Theme Folder –> tribe-events –> month –> single-event.php
On line 34 we added these three lines:
<?php if( function_exists(‘tribe_the_custom_fields’) && tribe_get_custom_fields( get_the_ID() ) ): ?>
<?php tribe_the_custom_fields( get_the_ID() ); ?>
<?php endif; ?>This is just checking to see if there is a custom field and if so display it. This works perfectly on normal screen resolutions. However, once the calendar switches to the mobile view (with the dots and listing the events below). There are no events. I checked the source, and it is as if there are not events on those days.
You can see the result here: http://boilercatholics.org/events/
When I removed those three lines, the mobile version works perfectly, but obviously, we no longer display our room numbers.
Thank you for your help.
Thank you,
AnthonySeptember 15, 2014 at 10:48 pm #745859BrookParticipantHowdy anthony,
That is a little off. I am not sure why that is happening off the top of my head. Looking at your code it could be that the output is being called twice.
I am going to take a look at this tomorrow and try to recreate the problem, see if I can offer you some specific advice. In the mean time pleas elet me know if you have any more questions. Thanks!
– Brook
September 16, 2014 at 6:19 am #746233Anthony D’ArcoParticipantJust thought I would shoot you a quick update. I tried removing the if statement, so the code is now only:
<?php tribe_the_custom_fields( get_the_ID() ); ?>
However, I’m having the same issue. I should mention that we are running a pretty standard Genesis theme (not sure if that will help or not).
Thank you,
AnthonySeptember 17, 2014 at 6:04 pm #749615BrookParticipantHowdy anthony,
We have been having some issues with our forum software this past week. I am sorry. My previous response never made it to you.
I tried placing your latest code in my month/single-event.php file. It worked fine in both desktop and mobile views. However, on your website that code is appearing inside of the tooltip, not where it should if it is the single-event. It seems that we are doing something different. Would it be possible to obtain a copy of your tribe-events theme override folder so that I can look through it? If you would like to email it to [email protected], and mention my name I will be able to comb through.
If you have any extra info regarding what you think I did different, please let me know. Thanks!
– Brook
September 18, 2014 at 6:24 am #750542Anthony D’ArcoParticipantBrook,
I just looked, I must have not noticed that you updated the template structure for the tooltip (because it looks pretty different than how it did before). Can you guide me to which file I need to update to actually change the tooltip correctly?
Thank you,
AnthonySeptember 18, 2014 at 6:46 am #750581Anthony D’ArcoParticipantSorry,
I actually found where I need to add the custom field, but now I’m not sure how to do it:
in month/tooltip – line 26 is perfect, but I’m not sure how to add this. I’m not a JS expert really at all.
Sorry,
AnthonySeptember 18, 2014 at 6:56 am #750595Anthony D’ArcoParticipantI apologize one last note in my confusion:
I followed your instructions in single-event.php, but I can’t figure out where to add the initial php to setup the data or if I’m even doing it correctly. Can I add it right to the tooltip.php?
Thank you,
AnthonySeptember 19, 2014 at 2:47 pm #753720BrookParticipantAhh! That explains it. I was wondering if you might have been running a theme override from before our update. We try to keep those the same, but sometimes we have to update them which means you will too. If you are concerned about that going forward keep an eye on our release notes, particularly the “Changes you should be made aware of”.
We are working on some updated documentation almost site wide, and one thing I am excited for is better explanation of tooltip overrides. They are undeniably cool and better in almost every way, but have a learning curve.
You might find this answer helpful. It’s basically exactly what you want. To be honest, I do not think I could word it better so why not link to a great comment instead? Did that make sense? Let me know if I can be of further help. Thanks anthony!
– BrookSeptember 20, 2014 at 5:28 am #754794Anthony D’ArcoParticipantThis worked perfectly! It funny I was actually doing it correctly, but I thought I needed to pass my custom field as a slug so I was using ‘venue_rooms’ instead of “Venue Rooms;” silly me. All is right in the world again.
Thank you,
AnthonySeptember 20, 2014 at 5:29 am #754797Anthony D’ArcoParticipantwhoops meant to click “My issue is resolved.”
Thank you,
AnthonyOctober 7, 2014 at 7:32 am #794118BrookParticipantThis topic is now archived. Cheers!
– Brook
-
AuthorPosts
- The topic ‘Adding Custom Field to Month View Breaks the Mobile Calendar’ is closed to new replies.