Remove end time, details section, single event page

Home Forums Calendar Products Events Calendar PRO Remove end time, details section, single event page

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #1186441
    Sally Newcomb
    Participant

    I have successfully removed the end time from the list page of events using the knowledgebase – https://theeventscalendar.com/knowledgebase/remove-end-time-for-events/), but the end time still appears in the details section of the individual event page.

    What code or snippet do I need to remove the end time, but leave the start time.
    And can I remove the end time from the add an event forms both back end and also on the community form?

    • This topic was modified 7 years, 6 months ago by Sally Newcomb. Reason: Placed in wrong forum
    #1186792
    Geoff B.
    Member

    Good evening Sally and welcome back!

    Thank you for reaching out to us.

    I would love to help you with this topic.

    What code or snippet do I need to remove the end time, but leave the start time.

    The most robust way to do this is to simply create a template override:

    1. Create a /tribe-events/ folder in your WordPress theme
    2. Create subfolders in that newly created folder. Specifically /modules/meta/
    3. Place a modified version of details.php were lines 95-98 are commented or deleted in /yourtheme/tribe-events/modules/meta/ (here is such a copy of details.php: details )

    You might want to read our Themer’s guide to get a sense of how that works.

    And can I remove the end time from the add an event forms both back end and also on the community form?

    Hiding it is preferable over removal as the end time does serve a purpose in our code.
    You can customize the community add form to your liking using the same method as we did to remove the end time.

    There is a specific section of the themer’s guide that tells you which file to edit and which directories to use in your /tribe-events/ folder.

    The backend is a bit trickier, but not impossible. If you use CSS with relative elements you should be able to hide most of the end time related fields.

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1186963
    Sally Newcomb
    Participant

    This reply is private.

    #1187541
    Geoff B.
    Member

    Good evening Sally,

    You are absolutely right. My bad.

    Here is an updated version of the details.php file which should fix that: details

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1187614
    Sally Newcomb
    Participant

    Awesome that worked. I just LOVE the events calendar! 🙂

    So now if I wanted to change the word ‘Time:’ to ‘Start Time’ within that same details section, how would I do that?

    #1188039
    Geoff B.
    Member

    Good evening Sally,

    Thank you for your awesome words.

    The easiest way to do this would be to edit the latest details.php file I sent you at line 98 and simply swap these 2 words. You should be good to go 🙂

    Have a good week-end,

    Geoff B.

     

     

    #1188626
    Sally Newcomb
    Participant

    Perfect 🙂 Thank you.

    Next question, still relevant to the single event details section:
    I need to change the wording re the recurring events as at the moment it reads strangely and I’d like to remove the words ‘Once on’ and ‘and Once on’:
    Is that possible?

    Date: 13th November
    Starts: 9:00 am
    Recurring: Once on 18th December 2016,
    and Once on 22nd January 2017,
    and Once on 19th February 2017,
    and Once on 12th March 2017,
    and Once on 9th April 2017,
    and Once on 7th May 2017
    (See All)

    #1188965
    Geoff B.
    Member

    Good evening Sally,

    I am glad you tackled this last one like a pro. Kudos!

    I believe you are talking about the admin interface. More specifically the recurrence rule section.

    From a logical programming standpoint, the “Once on” followed by “and once on” makes perfect sense.

    We typically advise against changing the admin interface. But if you really want to give this a shot, you can try the following snippet: https://theeventscalendar.com/knowledgebase/change-the-wording-of-any-bit-of-text-or-string/

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1188975
    Sally Newcomb
    Participant

    This reply is private.

    #1189380
    Geoff B.
    Member

    Good evening Sally,

    Thank you for clarifying that.
    As your site is protected by a maintenance page, I can’t really see what is going on there, but I am glad you also sent a screenshot.

    I totally see what you mean. However, that is not default behaviour for recurring events.
    I am pretty sure this is the result of customization.

    Could you please send me a copy of the latest version of your WordPress theme (Dynamik-Gen) via a link to a .zip file link (stored Dropbox or Google Drive) so that I can run some tests on my end ? I recommend a private reply for that purpose.

    Please ensure you are using the latest files as found on your actual website.
    This way I will get access to any updates or customizations you might have made.

    And while you are at it, could you also send me a screenshot of the “Edit event” screen of that recurring event (especially the recurrence rules).

    Best regards,

    Geoff B.

     

    #1190025
    Sally Newcomb
    Participant

    This reply is private.

    #1190726
    Geoff B.
    Member

    Good evening Sally,

    Thank you for the files.

    I tried to replicate your exact issue with your theme installed.
    Unfortunately, no matter what I did, I was not able to get the “Recurring:” section happening in the event meta.

    It does look like this is a customization since the recurrence rules do not display in the event meta by default.

    Is it possible that there is a discrepancy between the files you have sent me and the ones found on your server ?

    Have a great day!

    Geoff B.

    #1191321
    Sally Newcomb
    Participant

    This reply is private.

    #1192199
    Geoff B.
    Member

    Good evening Sally,

    Thank you for the files.

    As I suspected, there are some additional files (customizations) on the theme found on your folder.

    More specifically, the details.php file found in /dynamik-gen/tribe-events/modules/meta/

    The problem lies at line 115: tribe_get_recurrence_text( get_the_ID() )

    This function is the same one used by the backend interface of Recurrence rules.
    Therefore, I would advice against modifying it.

    Short term, you can simply delete that line (which will remove the list of dates, but keep the link to all events).

    What you would need to do is come up with your own function that filters the result of the tribe_get_recurrence_text( get_the_ID() ) function to remove the words you do not want.

    Once that is done, you would replace line 115 with something like sally_get_recurrence_text( get_the_ID() ).

    As you might know, the scope of our support is mostly to get our customers started on the right track and to help them in case of issues.

    We unfortunately do not provide complete support for customization.

    If programming is not really your thing, you could hire one of our recommended customizers to do the customization for you.

    I wish I had a better answer for you, but for now it’s the best one I have.

    Have a great day!

    Geoff B.

    #1192289
    Sally Newcomb
    Participant

    Thank you so much. Deleting the line seems a good solution.

    Also, on my main events page, (because I have chosen to use ‘List View’ as the default setting), there is an ‘All Events’ link, which is confusing for users although it needs to appear on all single event pages. Can it be removed from the events list but still appear on the single events pages?

Viewing 15 posts - 1 through 15 (of 20 total)
  • The topic ‘Remove end time, details section, single event page’ is closed to new replies.