Add link in tour category

The developer documentation assumes you have knowledge and coding skills. While we created these docs to help you achieve things not available in the original features, we do not provide support if something doesn’t work when referencing the developer documentation. If the example code doesn’t work for you, please debug it yourself or hire a freelancer to help with debugging.

All customizations will be lost when you update our theme/plugin to a new version in the future. To avoid this, you must use filters and actions: 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.