How can I modify specific attribute in CSS

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.

Read More

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?

Related posts

2 comments

  1. You can use a redirection plugin: Redirection and that would serve the need:

    1. Download redirection.zip
    2. Unzip
    3. Upload redirection directory to your /wp-content/plugins directory
    4. Go to the plugin management page and enable the plugin
    5. Configure the options from the Manage/Redirection page
  2. With the incomplete information you provide in your question I would try something like this:

            if($ct_options['ct_book_now'] == 'Yes') {
                echo '<p>';
                    echo '<a href="'.get_permalink().'">'.get_the_title().'</a>';
                echo '</p>';
            }
    

Comments are closed.