Add link in tour category

The docs for developer mean you must have knowledge and coding skill. Although, we’re create the docs for developer to help you achieve something not available in original feature, but we don’t provide support for anything not work when you reference with docs for developer. If the example code not work for you, please debug it by your-self or hire a freelancer to debug it for you instead.

All the customize will lose when you update our theme/plugin to new version in future. To avoid it, you must use filter and action: https://developer.wordpress.org/plugins/hooks/.

When you use tour category page builder, the image don’t have link and for some reason relate to CR you want add link in it, so please follow this article to achieve it.

Please go to: /plugins/tourmaster/tour/include/pb/pb-element-tour-category.php then search tourmaster-tour-category-item-wrap and you will get the code below:

$ret .= '<div class="tourmaster-tour-category-item-wrap" ' . tourmaster_esc_style(array(
    'border-radius' => empty($settings['border-radius'])? '': $settings['border-radius']
)) . ' >';
if( !empty($thumbnail) ){
    $ret .= '<div class="tourmaster-tour-category-thumbnail tourmaster-media-image" >';
    $ret .= tourmaster_get_image($thumbnail, $settings['thumbnail-size']);
    $ret .= '</div>';
    $ret .= '<div class="tourmaster-tour-category-overlay" ></div>';
    $ret .= '<div class="tourmaster-tour-category-overlay-front" ></div>';
}

Change it to:

$ret .= '<div class="tourmaster-tour-category-item-wrap" ' . tourmaster_esc_style(array(
    'border-radius' => empty($settings['border-radius'])? '': $settings['border-radius']
)) . ' >';
$ret .= '<a class="tourmaster-tour-category-head-link-custom" href="' . get_term_link($category->term_id, $taxonomy) . '" >';
if( !empty($thumbnail) ){
    $ret .= '<div class="tourmaster-tour-category-thumbnail tourmaster-media-image" >';
    $ret .= tourmaster_get_image($thumbnail, $settings['thumbnail-size']);
    $ret .= '</div>';
    $ret .= '<div class="tourmaster-tour-category-overlay" ></div>';
    $ret .= '<div class="tourmaster-tour-category-overlay-front" ></div>';
}
$ret .= '</a>';

And check your site again.