Home › Forums › Calendar Products › Events Calendar PRO › Changing the "all" text in permalinks for recurring events
- This topic has 10 replies, 3 voices, and was last updated 9 years, 7 months ago by
natiotech.
-
AuthorPosts
-
September 28, 2016 at 11:19 am #1169964
natiotech
ParticipantHello,
I am developing a website with Event calendar pro that needs to be completely in French. I have been able to translate most of the content. However, I haven’t been able to find how to change the “/all” in the permalink for recurring events. I checked in the .PO language file for translation and no success. I was able to change the “all” text (for “tous” in French) by modifying the Permalinks.php (wp-content\plugins\events-calendar-pro\src\Tribe\Recurrence\Permalinks.php) but that only changes the text displayed in the Dashboard. When I publish the event, the actual url is still at “therecurringevent/all”.
What is the best way to change this “all” automated permalink text for something in an other language? I don’t think modifying the Permalink.php directly is a good practice since a future update could undo those changes (I looked at the Themer’s Guide – Customizing Template Files)
Thank you,
September 28, 2016 at 9:32 pm #1170210Geoff B.
MemberGood evening STEPHANE and welcome to the Events Calendar Support forum!
That is a great question.
You are right, it would be better to replace the “all” link using a function than trying to replace it directly in our plug-in’s code.
I will need to ask around, but I am pretty sure that the functions that need to be changed are located in /events-calendar-pro/src/functions/template-tags/general.php
Let me see if we cannot have snippets for that very purpose ?
Hang in there as I look that up for you.
As a side note, we can also continue this conversation in French if you prefer.
Best regards,
Geoff B.
September 30, 2016 at 7:32 am #1170985Geoff B.
MemberGood morning Stephane,
I have a couple of good news for you:
- I have opened a ticket so that this slug becomes translatable. Unfortunately, I cannot commit to a release date at this point. But stay tuned, you will be contacted when it is released.
- I have managed to get a snippet for you as a workaround: https://gist.github.com/barryhughes/eef63b959317d96ba4de28bebfd4d3e0
Just make sure you replace ‘everysingleone’ by the string of your choice AND re-save your permalinks after adding this.
Let me know how that goes.
Best regards,
Geoff B.October 4, 2016 at 7:49 am #1172263natiotech
ParticipantHello,
Thanks for opening a ticket and for the workaround!
I also appreciate the offer for support in French, but I’d rather communicate in English when it comes to technical terms.
I am not sure how to implement this.
I tried copying the “custom-all-recurring-events-slug.php” in “/wp-content/themes/[my-theme]/tribe-events/pro/” and changed the ‘everysingleone’ for the desired value.
I visited the Settings > Permalinks screen and re-saved my Permalinks but it didn’t work. I also created a new event to be sure but same results. And finally, I tried copying the file in “/wp-content/themes/[my-theme]/tribe-events/” instead but no luck.
October 4, 2016 at 11:56 pm #1172580Geoff B.
MemberGood evening Stephane,
Thank you for writing back.
To implement the snippet above, you need to add it to your theme’s functions.php (just make sure you do not paste the opening <?php tag.
If you are uncomfortable with this, could you please send me a copy of your WordPress theme / child theme in a .zip file link (via Dropbox or Google Drive) so that I can run some tests on my end ?
Please ensure you are using the latest files as found on your actual website.
This way I will get access to any updates you might have made.Let me know how that goes.
Best regards,
Geoff B.October 6, 2016 at 7:08 am #1173181natiotech
ParticipantHello,
Adding the snippet in functions.php did work but not completely. The event is still being created under /all as the actual url and the change seems to only affect the “See all” link.
I created a new event to be sure. After setting up a recurrence rule, I clicked on “See all” for one of the event of the series and it goes to the url “myevent/tous” but gives me a 404 not found error. If I go the url “myevent/all” instead, I can see all of the events in the series, meaning that the event is still being created under the “/all” url.
Let me know if you need anything from me to help you find the solution.
Thank you,
October 6, 2016 at 6:53 pm #1173528Geoff B.
MemberGood evening Stephane,
You are absolutely right, it looks like something is missing for this to fully work.
Our apologies.I will get back to the snippet author with this.
Hang in there as we rework this snippet.
Thank you for bringing this to our attention.
Best regards,
Geoff B.
October 7, 2016 at 11:07 am #1173856Geoff B.
MemberGood afternoon Stephane,
Great news, the snippet has been updated and should now work! https://gist.github.com/barryhughes/eef63b959317d96ba4de28bebfd4d3e0
Let me know how that goes.
Best regards,
Geoff B.October 11, 2016 at 6:01 am #1174868natiotech
ParticipantHi,
Yes that worked, thank you!
The only place where it is still displayed “all” is in the dashboard when you create the event. I know that can be changed by modifying the value in “Permalinks.php” in “wp-content\plugins\events-calendar-pro\src\Tribe\Recurrence\” but since it will be modifiable in a future release, it doesn’t really matter for now. The important thing is that the actual link can be modified and works.
Thank you and have a nice day!
October 11, 2016 at 9:49 am #1175040Geoff B.
MemberGood afternoon Stephane,
I’m super stoked that this worked for you!
You are welcome back on our support forums any time 🙂
For now, I am going to close this thread.
Have a great week!
Geoff B.
-
AuthorPosts
- The topic ‘Changing the "all" text in permalinks for recurring events’ is closed to new replies.
