I am using WordPress. The following piece of code resides in loo-services.php
if($ct_options['ct_book_now'] == 'Yes') {
echo '<p>';
echo '<a class="book-now btn" href="#" data-service="';
the_title();
echo '">' . __('Book Now', 'contempo') . '</a>';
echo '</p>';
}
This piece of code generates through data-service="the_title()"
method.
There is a button on the website “Book Now” When this button clicked then its forwarding to the default page.
I want when “Book Now” button clicked then forward user to another page rather then its default page that is used from data-service="the_title()"
.
On homepage there is a link of default service e.g. “Clinical Consultation”. When this is clicked then link auto directs to its default page whereas I want to link this to custom page that I build in page builder e.g. This link www.website.com/index.php/clinical-consultation-2 instead of its default page link?
You can use a redirection plugin: Redirection and that would serve the need:
/wp-content/plugins
directoryManage/Redirection
pageWith the incomplete information you provide in your question I would try something like this: