- October 8, 2019 at 11:20 am #20357
This plugin seem to be an almost perfect fit for our current client, I just need to check a few things that I cannot currently wrap my head around. I’ve been trying to translate the itinerary slug to multiple languages, I want the url to be different depending on what language is selected.
Ex. site/itinerary in English, site/resor in Swedish. Is this possible to do, or do I have to write some custom code for the functions.php file that links the new url to the itinerary page?
Also a feature request: That the wp_travel_(start|end)_date in wp_options should be updated to the next future date if the itinerary has multiple fixed departures, I have added an on-update function and a pseudo cron-job (daily) that does this, but it is not ideal. (It is also updated to the last date if all dates are set in the past)
Otherwise this plugin shows great potential, and we’re going to go with the pro-version since it offers so many great things right out of the box!
EmilOctober 10, 2019 at 6:30 am #20397
Thank you for your interest in WP Travel plugin.
Please find the answer to your queries below :
Query 1 : I want the url to be different depending on what language is selected.
Response 1 : The itinerary slug, as of now, cannot be translated and thus the feature to translate the site URL is not available in the plugin. However, we have listed this feature as a requested feature and will work on it in our coming updates.
However, if you immediately want the feature in your side, you can consider hiring our professional developer.
Query 2 : That the wp_travel_(start|end)_date in wp_options should be updated to the next future date if the itinerary has multiple fixed departures.
Response 2 : Actually, your query is not quite clear to us. In case of multiple dates, when the most recent date gets expired, the immediate recent date of the trip appears in the meta info section of the single trip page. Can you please explain further the case in which you are pointing to so that we can inspect the issue further ?
For any further query/confusion, feel free to reach back to us.
Regards!October 10, 2019 at 9:42 am #20416
In response to #1. I happen to be the developer, so I have to fix it myself. No worries, I’m glad you’re looking in to it.
As to #2, it has to do with sorting my wp_queries. As it is now it is not possible to sort by date if an itinerary has multiple fixed departures, because the wp_travel_(start|end)_date remains empty. My cron-job goes through the itineraries with multiple fixed departures on a daily basis and updates these fields with nearest date from the serialized data. it is also run when an itinerary is saved/updated.
Example: if we have an itinerary with multiple fixed dates (1/5, 5/5, and 15/5) if the current date is 25/4 then my cron-job will update the field so that the start date is set to 1/5 (and the corresponding end date). If the current date is 2/5 then start date will be set to 5/5, and lastly if the current date is any date past 15/5 (ex. 21/11) then the start date will be set to 15/5. This allows me to sort the itineraries on the page. It will mimic a regular itinerary and show the next upcoming date (or the last date if all have past). If my client then want to add another departure it would update it again and it would show up on the page of itineraries.
Could this be possible to implement? I’ve seen a few posts that complain that they couldn’t query the itineraries and order by date. At least as an option (disabled by default?). I’d rather not have to maintain a separate cron-job and have to update it each time you might make an update on how the dates are handled.
EmilOctober 10, 2019 at 11:40 am #20420
Thank you for your elaborations.
Actually, WP Travel already has its feature to show the next start date when the most recent start date gets expired. You don’t need to make any cron jobs for this task. However, the feature to sort the itineraries with date is under development phase and we will come up with this feature as soon as possible.
wp_travel_get_fixed_departure_datehandles the job to select the most recent start date which is already in the WP Travel plugin.
Hope this clears your confusion.
Regards!October 12, 2019 at 10:03 am #20510
Thank you, I’ll look in to that function!October 14, 2019 at 3:29 am #20531
Please do look into the functions and if you find any difficulties then kindly let us know.
- The forum ‘WP Travel’ is closed to new topics and replies.