We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket
Viewing 7 posts - 1 through 7 (of 7 total)
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketWe have moved to a support ticketing system and our forums are now closed.
Open Support TicketHello
My website is http://www.foodtrucks2u.com.au.
On my listings I have a button “Book this Food Truck” https://www.foodtrucks2u.com.au/food-trucks/sydney/jolly-slush-sydney/.
I would like to know how I replace the current link to Send Enquiry on the Details page with my own link?”
Is there a special functions code, otherwise which template can we manipulate to manually change the link.
Thanks
Danielle
Hello,
If you just want to make a new link on each listing, you could hide ‘send enquiry’ with CSS and either:
1) Add a widget that only shows on Detail pages that has a link to a different form
2) Add a custom field (URL) that is an Admin only field with the link you want, then style that as you like
If that isn’t what you are looking for, maybe you want to customize?
For V1, we have an example of how a 3rd party plugin can be used instead of or in addition to the send enquiry feature:
Dynamic shortcode: https://wpgeodirectory.com/formidable-forms-in-geodirectory-tabs/
However, if you are leaning towards this type of integration, we would recommend at least trying it out with V2 first to see how much easier it is with Ninja Forms as an example:
https://wpgeodirectory.com/geodirectory-v2-ninja-forms/
For more about V2 see:
https://wpgeodirectory.com/docs-v2/geodirectory/overview/
Let us know if those aren’t what you are looking for.
Hi Danielle,
Thanks for your post. Do you mean you want to change the “Book this Food Truck” to link to something else?
Thanks!
Hi Kor
Yes I do.
Dani
Hi there,
Try using the code from this post and see if it helps. https://wpgeodirectory.com/support/topic/send-enquiry-link/#post-417543 . You can use the ‘Code Snippets’ plugin for this.
Thanks!
“Thanks for providing the following snippet to change the enquiry form link. This has been added, but the class is not showing when its added, so i’m unable to style. You can see on this page https://www.foodtrucks2u.com.au/food-trucks/sydney/chillato-pop-up-gelato-bar/
Could there possibly be some part of the code that is not correct? Can I also ask if its possible to add a target(blank) to the link and if so, would you let me know what to add. This is what we have added from post https://wpgeodirectory.com/support/topic/send-enquiry-link/#post-417543
add_filter(‘sd_details_output_send_buttons’,’_my_change_contact_link’);
function _my_change_contact_link($content){
return str_replace(‘”javascript:void(0);” class=”b_send_inquiry”‘,'”#form” ‘,$content);
}
Thank you
Danielle
Hi Danielle,
Try this code and see if it helps.
add_filter('sd_details_output_send_buttons','_my_change_contact_link');
function _my_change_contact_link($content){
return str_replace('"javascript:void(0);"','"https://share.hsforms.com/1CrB1l7dITVGFWOYhgcjsLQ2x9zt" class="b_send_inquiry" ',$content);
}
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketGet the latest news, tips, and exclusive content directly in your inbox.
Confirm your email address, and instantly receive the discount code :)