Help Desk

Change "All Events" Back Link In Single Event View

  • | Permalink

    I’m trying to change the wording for “All Events” in the single event view. It is the link that takes you back to the “events” page. I tried the snippet provided by the forum but it missed up my translations.

    Any help with the issue is really appreciated.
    Faze

    Posts: 10167 Topics: 3
    | Permalink

    Hey Faze, thanks for reaching out!

    I think the best way to change the wording in this case would be to edit the single-event.php template here the link is located. You can find the template here:

    /wp-content/plugins/the-events-calendar/src/views/single-event.php

    The link starts on line 27.

    It’s also worth noting that you can override calendar templates in your theme directory (more on this in our Themer’s Guide) to prevent losing any changes on future plugin updates.

    Cheers!
    Geoff

    | Permalink

    Thanks Geoff for your prompt and informative response.
    Now the “All Events” issue is resolved. What about “EVENTS FROM” and “Date” in the nav bar? I would like to change the wording on these too.

    Best,
    Faze

    Posts: 10167 Topics: 3
    | Permalink
    Correct Answer

    Hi Faze,

    You might want to consider using the Say What? plugin for your translations if you have several like this–managing the changes in the plugin will be much easier than managing them in templates. Say What? will let you change the text of any wording in the calendar.

    Thanks!
    Geoff

    | Permalink

    Dear Geoff,
    Say What misses some of the other translations on my website, that is why I need to figure out where to find the exact location of the strings in the nav bar from the code.

    Thanks

    Posts: 10167 Topics: 3
    | Permalink

    Ah, gotcha. Thanks for clarifying!

    It’s a little tricky in this case because the search bar is generated with javascript. I would recommend editing the language file directly using a tool like POEdit. All the strings will be included in the .po file for your translation and will be much easier to maintain.

    We have a tutorial that provides step-by-step instructions for overriding existing language files in the plugin so that changes do not get lost on future plugin updates.

    Cheers!
    Geoff

    Posts: 10167 Topics: 3
    | Permalink

    Hey Faze, I see one of my last replies was marked as the correct answer. I’ll go ahead and close this thread but please feel free to let us know if any other questions pop up and we’d be happy to help. 🙂

    Cheers and have a great day!
    Geoff