在wp模板的这部分代码中,我想将“Book Now”按钮的永久链接url更改为自定义链接示例:“www.mywebsite.com”
byt_render_field("description clearfix", "", "", $accommodation_description_html, \'\', false, true);
if (!empty($current_url) && $current_url == $list_user_accommodations_url)
byt_render_link_button($submit_accommodations_url . \'?fesid=\' . $accommodation_id, "gradient-button clearfix", "", __(\'Edit\', \'bookyourtravel\'));
else
byt_render_link_button($accommodation_obj->get_permalink(), "gradient-button clearfix", "", __(\'Book now\', \'bookyourtravel\'));
最合适的回答,由SO网友:ville6000 整理而成
我不知道是什么byt_render_link_button()
是的,但我试试这个。
<?php
byt_render_field("description clearfix", "", "", $accommodation_description_html, \'\', false, true);
if (!empty($current_url) && $current_url == $list_user_accommodations_url) {
byt_render_link_button($submit_accommodations_url . \'?fesid=\' . $accommodation_id, "gradient-button clearfix", "", __(\'Edit\', \'bookyourtravel\'));
} else {
byt_render_link_button( \'http://www.mywebsite.com\', "gradient-button clearfix", "", __(\'Book now\', \'bookyourtravel\') );
}