Adding Custom Field to Month View Breaks the Mobile Calendar

Home Forums Calendar Products Events Calendar PRO Adding Custom Field to Month View Breaks the Mobile Calendar

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #741783
    Anthony D’Arco
    Participant

    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,
    Anthony

    #745859
    Brook
    Participant

    Howdy 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

    #746233
    Anthony D’Arco
    Participant

    Just 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,
    Anthony

    #749615
    Brook
    Participant

    Howdy 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

    #750542
    Anthony D’Arco
    Participant

    Brook,

    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,
    Anthony

    #750581
    Anthony D’Arco
    Participant

    Sorry,

    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,
    Anthony

    #750595
    Anthony D’Arco
    Participant

    I 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,
    Anthony

    #753720
    Brook
    Participant

    Ahh! 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!
    – Brook

    #754794
    Anthony D’Arco
    Participant

    This 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,
    Anthony

    #754797
    Anthony D’Arco
    Participant

    whoops meant to click “My issue is resolved.”
    Thank you,
    Anthony

    #794118
    Brook
    Participant

    This topic is now archived. Cheers!

    – Brook

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Adding Custom Field to Month View Breaks the Mobile Calendar’ is closed to new replies.