There are many who use the Feedzy plugin to get content from other websites to, for example, make a portal of related news, home pages of communities, etc..
The function of this plugin is to import content from an RSS feed and publish them on your website, as if they were your own entries.

So far so good, because the plugin works perfectly, it imports the feed entries you add and publishes them with all their content, images, etc. on your website, but what if you want the links of the imported entries to point to the original URLs instead of to the entries automatically created on your site?
This would be the most ethical way to use the Feedzy plugin, as you can then display content or excerpts from other sites, but the attribution will always be to the original content, with all links pointing to each source URL.
Unfortunately, there is no setting in Feedzy to do this. If you publish on your portal home page the imported posts, both the title link, image and excerpt will point to the URL of the site they were imported into, rather than the original URL.
Another problem is that, although it is possible to do it, it is not well documented on the Feedzy website, but on the website of its parent company, ThemeIsle, where fortunately we have a lot of filters that we can apply to Feedzy to modify its behavior.
And there are a couple of filters that are exactly what we’re looking for, with some minor modifications, which I’ll include for you.
Table of Contents
How to make the title of entries imported by Feedzy point to the original URL
The filter that we must apply to get the titles of the imported entries to lead to each original URL is as follows:
/* Redirect post tiles imported by Feedzy to original URL */
add_filter( 'post_link', function( $url, $post ) {
if ( is_admin() ) {
return $url;
}
$id = $post;
if ( is_object( $post ) ) {
$id = $post->ID;
}
$feedzy = get_post_meta( $id, 'feedzy', true );
if ( intval( $feedzy ) === 1 ) {
return get_post_meta( $id, 'feedzy_item_url', true );
}
return $url;
}, 99999, 2 );
Code language: PHP (php)
How to make the excerpt and read more button of the entries imported by Feedzy point to the original URL
If, in addition, you also want the excerpt and the read more text/button to link to the original post, the filter would be this one:
/* Redirect post excerpt imported by Feedzy to original URL */
function new_excerpt_more($more) {
$current_post_id = get_the_ID();
$current_post_meta = get_post_meta($current_post_id);
if (isset($current_post_meta['feedzy_item_url'][0])) {
return ' <a href="' . $current_post_meta['feedzy_item_url'][0] . '">Read more</a>';
}
return $url;
}
add_filter('excerpt_more', 'new_excerpt_more');
Code language: PHP (php)
And you’re done, just add the above codes and you would be linking to the original URLs, both from the title and from the excerpt and read more button.
If you don’t know where or how to add these codes here is a very simple tutorial of several ways to do it:
WordPress guide: How and where to paste PHP, JS, CSS codes and functions
hello for your help about How to link to the original URL with Feedzy. I pasted your code in fonction.php and it works very well on deskop but on smartphone it doesn’t work when I click on the post it sends me to the wordpress post instead of redirecting me to the original url