How to remove links

Here is a simple function which uses REGEX to remove link, but keep the anchor content:

function tifd_feedzy_remove_link_matches( $matches ) {
    return $matches[2];
}
function tifd_feedzy_remove_link( $content, $feedURL ) {
    $pattern= '/<a.*href=\"(.*)\".*>(.*)<\/a>/iU';
    $content= preg_replace_callback( $pattern, 'tifd_feedzy_remove_link_matches', $content );
    return $content;
}

We’re now going to use this function with the Feedzy hooks:

//Remove the thumnail link
add_filter( 'feedzy_thumb_output', 'tifd_feedzy_remove_link', 9, 2 );
 
//Remove the title link
add_filter( 'feedzy_title_output', 'tifd_feedzy_remove_link', 9, 2 );
 
//Remove the author link
add_filter( 'feedzy_meta_output', 'tifd_feedzy_remove_link', 9, 2 );

If you want to delete all links except for "Read More":

	function tifd_feedzy_remove_link_matches( $matches ) {
    return $matches[2];
}

function tifd_feedzy_remove_link( $content, $sc, $feed_title, $feed_items ) {
    $pattern= '/<a.*href=\"(.*)\".!?(feedzy_more_link)*>((.|\n|\r\n)*)<\/a>/iU';
    $content= preg_replace_callback( $pattern, 'tifd_feedzy_remove_link_matches', $content );
    return $content;
}
add_filter( 'feedzy_global_output', 'tifd_feedzy_remove_link', 11, 4 );

function tifd_feedzy_readmore( $content, $link, $feedURL ) {
    $content = str_replace( '[&hellip;]', '<a href="' . $link . '" target="_blank" class="feedzy_more_link">' . __('Read more', 'yourTextDomain') . ' &rarr;</a>', $content );
    return $content;
}
add_filter( 'feedzy_summary_output', 'tifd_feedzy_readmore', 9, 3 );

*NOTE : We highly recommend not to make any changes in the original plugin file, as it might break when updated. To make this work, create a fix plugin and there, add this code snippet.

Alternatively, you can download and activate the following plugin, to remove all the links (except for "Read More") in all your feed items: Feedzy Fix to Remove Links

You can make changes to the above plugin according to your needs.