- This topic has 18 replies, 4 voices, and was last updated 4 years, 10 months ago by
Support Team.
- AuthorPosts
- January 17, 2018 at 11:43 pm #3932
genb84
ParticipantEvery time the plugin is updated, I lose all of the edits I made to the plugin, causing me to have to go back to my file manager and make the changes all over again.
Is there a way around this?
I’d like the trip price to be “Per Night” as that is how many U.S. hotels charge.
Additionally, since I live in the U.S., I would like to make the default country “Unites States” instead of Afghanistan.
Lastly, on the tabs, I’d like to update what they say. I don’t want “Trip Outline” for example. I prefer to have “Accommodation Details”. Is there way to fix this without having to constantly change it every time an update is released?
Please advise.
January 18, 2018 at 6:57 am #3939Support Team
KeymasterHello @genb84,
First of all, let us make you clear that if you make any modification directly in your original plugin file then all of your modification will be lost upon update to the latest versions and us have also been encouraging you to use the child theme for any code customization.
Even now we strongly recommended you to use the child theme to make any modification to the plugin file so that your original plugin file will not be affected and you can update to the latest versions without the fear of losing the modifications.
Now answers to your query are mentioned below:
Additionally, since I live in the U.S., I would like to make the default country “Unites States” instead of Afghanistan.
To change the default country in the booking form you have to paste below-given code in your child theme functions.php file.
You can even create the child theme using the plugin given below.
https://wordpress.org/plugins/wp-child-theme-generator/After activating the child theme in your child theme functions.php file paste below given code:
https://gist.github.com/anonymous/3244a2626a4d62067ec4f690a6f73b9a
Lastly, on the tabs, I’d like to update what they say. I don’t want “Trip Outline” for example. I prefer to have “Accommodation Details”. Is there way to fix this without having to constantly change it every time an update is released?
To change the Trip Outline to Accommodation Details paste below given code in your child theme functions.php file.
https://gist.github.com/anonymous/553f2455f940f6e81c05c3140cacd592
Hope this helps.
Also, we are soon releasing the update adding the feature where you will be able to change the text of the tabs from the Admin Dashboard.
Best Regards!!
January 20, 2018 at 9:33 pm #4035genb84
ParticipantHello. Thank you for the information. I appreciate all your hard work and really love this plugin.
I do already have a child theme installed on my website but I do not know how to make modifications to a plugin using a child theme since the themes folder and plugins folder are both in wp-content. I tried to research this but was unable to find an answer on how this can be done.
I did exactly what you instructed. I pasted the code in my child theme in the functions folder but received an error and had to delete the code in order to fix my website.
Lastly, I’d like the trip price to be “Per Night” instead of per person or per group.
Thanks, again!
January 22, 2018 at 7:15 am #4064Support Team
KeymasterHello @genb84,
The plugin has already been release adding the feature to edit the text of the tabs that are displayed on the frontend. For this, you simply need to go to Tabs section of the trips and edit the text.
Screenshot:https://image.prntscr.com/image/-V2kMNgaQvqhZpFTtdiQGg.png
Also please remove the code that we have provided for this option as it will create the conflict with latest release.
Now to change the default country in the booking form paste below given code.
https://gist.github.com/anonymous/d763dbd39ea993184afcaeb2461c44e3
Finally, to change the trip price to be “Per Night” instead of per person or per group paste below-given code in your child theme functions.php.
https://gist.github.com/anonymous/bc018042c8d20e8f18d6e2b8144e36cd
This will add the option Night in field “Price per” of Tabs section. So you can simply choose the option your choice.
Hope this helps.
Best Regards!!
January 22, 2018 at 8:51 am #4071genb84
ParticipantThank you for this information. I have installed a plugin called Ajax Custom CSS plugin. Can I paste the code into the JS area of this plugin?
Otherwise, I do not know where to paste the code you provided. Because as I mentioned before, when I placed the code you provided previously into the functions.php folder for the child theme, I received an error.
January 22, 2018 at 8:59 am #4074Support Team
KeymasterHello @genb84,
As mentioned in the earlier replies, please paste the above-given code into your child theme functions.php file.
If you directly made the modification in your original plugin file then all of the modification will be lost upon updating the plugin so please use a child theme for any modification in the plugin.
Hope this helps.
Best Regards!!
January 22, 2018 at 9:02 am #4076genb84
ParticipantAs I mentioned earlier, I have a child theme installed on my website but I do not know how to make modifications to a plugin using a child theme since the themes folder and plugins folder are both in wp-content. I tried to research this but was unable to find an answer on how this can be done.
I did exactly what you instructed. I pasted the code in my child theme in the functions.php folder but received an error and had to delete the code in order to fix my website.
How can I modify a plugin using a child theme? Both folders are located in wp-content.
January 22, 2018 at 9:17 am #4079genb84
ParticipantHere is the screen shot of the functions.php folder in my child theme.
January 22, 2018 at 10:29 am #4083Support Team
KeymasterHello @genb84,
Please paste the code that we have provided just above the PHP quote “?>” that is seen in your screenshot.
If it generates an issue please paste the issue to inspect further.
Thank you 🙂 .
Best Regards!!
January 22, 2018 at 5:31 pm #4091genb84
ParticipantThank you so much! It worked! 🙂
January 23, 2018 at 4:08 am #4096Support Team
KeymasterHello @genb84,
Nice to know that your issue is resolved.
Any further issues are always welcome.
Best Regards!!
March 30, 2018 at 6:23 am #5726fzhmango
ParticipantHi,
I’m trying to change the default country to Australia using “AU” for my child theme functions.php but the country is still defaulting to Afghanistan. What am I doing wrong here? Can you please help. Below is the screenshot of my functions.php file from my child theme:
I just noticed the screenshot is missing the last line which functions.php has.
add_action( ‘wp_footer’, ‘wp_travel_customize_default_country_setting’, 20 );
March 30, 2018 at 9:17 am #5740Support Team
KeymasterHello @fzhmango ,
The code you have pasted in the child theme doesn’t work in the recent version of wp travel plugin.
So please replace the code in your child theme with the code given below:
https://gist.github.com/Steeru/4e7731683c62aa1c5b493504d40354b6
Hope this helps.
Best Regards!!
March 30, 2018 at 9:23 am #5741fzhmango
ParticipantThanks heaps!!! It works now. Also it would be good to have this in the settings for your future releases.
March 30, 2018 at 9:50 am #5743Support Team
KeymasterHello @fzhmango ,
Glad we could help you.
If you have any issue further, please let us know.
We would also really appreciate if you could help us by rating our plugin by following the link below.
https://wordpress.org/support/plugin/wp-travel/reviews/
Hope this helps.
Best Regards!!
- AuthorPosts
- The forum ‘WP Travel’ is closed to new topics and replies.