Viewing 1 replies (of 1 total)
  • Plugin Author Content Views

    (@pt-guy)

    Hello,
    Please add this code to file functions.php of your active theme:

    // Content Views - Custom url for Title, Read-more, Thumbnail
    add_filter( 'pt_cv_field_href', 'cv_field_href' );
    function cv_field_href( $href ) {
    	global $post;
    
    	$custom_href = get_post_meta( $post->ID, 'NAME_OF_CUSTOM_FIELD', true );
    	if ($custom_href) {
    		$href = $custom_href;
    	}
    
    	return $href;
    }

    Best regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Link on Image and Title’ is closed to new replies.