如何修改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.

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?

我正在使用WordPress。 以下代码位于loo-services.php p>

  if($ ct_options ['ct_book_now'] =='是'){
 echo'&lt; p&gt;  '; 
 echo'&lt; a class =“book-now btn”href =“#”data-service =“'; 
 the_title(); 
 echo'”&gt;'  。  __('立即预订','当代')。  '&lt; / a&gt;'; 
 echo'&lt; / p&gt;'; 
} 
  code>  pre> 
 
 

这段代码通过数据生成 - service =“the_title()” code>方法。 p>

网站上有一个按钮“立即预订”当点击此按钮时,它会转发到默认页面。 p >

我希望点击“立即预订”按钮,然后将用户转发到另一个页面,而不是从 data-service =“the_title()” code>中使用的默认页面。

在主页上有一个默认服务链接,例如 “临床咨询”。 单击此按钮后,链接自动指向其默认页面,而我想将其链接到我在页面构建器中构建的自定义页面,例如 这个链接www.website.com/index.php/clinical-consultation-2而不是它的默认页面链接? p> div>

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

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>';
        }