wpSight: Create more button based on post type
<?php
/**
* Create more button based on post type
*
* @since 1.0
*/
add_filter( 'wpsight_excerpt_more', 'custom_excerpt_more' );
function custom_excerpt_more() {
$output = '';
$output .= '<div class="moretag-wrap">';
$output .= '<a class="moretag btn btn-success" href="'. get_permalink( get_the_ID() ) . '">';
if( wpsight_listing_post_type() == get_post_type() ) {
$output .= apply_filters( 'wpsight_listing_more_text', __( 'View Property', 'wpsight' ) );
} else {
$output .= apply_filters( 'wpsight_more_text', __( 'Read more', 'wpsight' ) );
}
$output .= '</a>';
$output .= '</div>';
return $output;
}