Title: Get post source link?
Last modified: August 20, 2016

---

# Get post source link?

 *  [jzatt](https://wordpress.org/support/users/jzatt/)
 * (@jzatt)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/get-post-source-link/)
 * Is it possible to get the source permalink for a post (in my WP-theme)?
 * I’m using a function where I use “get_permalink();” to analyze what is in the
   URL and then output something based on that. Ex: if the source contains “twitter.
   com” I output a little Twitter icon.
 * But when I use this with WPeMatico I get the internal link to the post instead
   of the source link of the post. Thus not giving me the info about where it comes
   from.
 * I was using FeedWordpress up until recently, then it worked great, because that
   plugin actually rewrites the permalink to the source. But WPeMatico applies some
   sort of filter instead when showing the post on the front-end.
 * [http://wordpress.org/extend/plugins/wpematico/](http://wordpress.org/extend/plugins/wpematico/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [yukiko-kawa](https://wordpress.org/support/users/yukiko-kawa/)
 * (@yukiko-kawa)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/get-post-source-link/#post-3147197)
 * Like him, I need a nice clear link at the real news.
    I use personal theme
 *  Thread Starter [jzatt](https://wordpress.org/support/users/jzatt/)
 * (@jzatt)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/get-post-source-link/#post-3147205)
 * I found a solution that works for me. Not sure if it´s the best way to do this,
   but it does the job at least.
 * Since WPeMatico applies a filter to “the_permalink()”, I took the code that runs
   the filter from WordPress “link-template.php” and made my own customized function
   in my themes functions.php:
 *     ```
       function source_permalink() {
       	$source_link = apply_filters('the_permalink', get_permalink());
       	return $source_link;
       }
       ```
   
 * Then in my theme I added this where I need the source link: `echo source_permalink();`
 *  [edkoon](https://wordpress.org/support/users/edkoon/)
 * (@edkoon)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/get-post-source-link/#post-3147285)
 * To enable a feed source permalink, enable the post template at the bottom of 
   the post campaign page. Then paste this in the text box:
 *     ```
       {content}
       <a target="_blank" href="{permalink}"><b>Read the rest of this syndicated article here.</b></a>
       ```
   
 * This plugin does work well, but will not post a defined tag, and is really cpu
   intensive when running a campaign. Author has not responded to repeated requests
   to fix the tag issues that i feel is of major importance for SEO purposes.
 * FeedWordPress is another option, but you need it’s dupe check plugin FeedWordPress
   Duplicate Post Filter, and to add a permalink you need FWP+: Add Attribution 
   by Charles Johnson: [http://projects.radgeek.com/add-attribution-feedwordpress/](http://projects.radgeek.com/add-attribution-feedwordpress/)
 * I have 34 campaigns defined in WPeMatico but are considering going back to FeedWordPress.
 * Note to anyone wanting to try FeedWordPress, You can not have FWP+: Add Attribution
   and WPeMatico active at the same time, Will prevent your site from loading.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Get post source link?’ is closed to new replies.

 * ![](https://ps.w.org/wpematico/assets/icon-256x256.jpg?rev=2757072)
 * [WPeMatico RSS Feed Fetcher](https://wordpress.org/plugins/wpematico/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpematico/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpematico/)
 * [Active Topics](https://wordpress.org/support/plugin/wpematico/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpematico/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpematico/reviews/)

## Tags

 * [permalink](https://wordpress.org/support/topic-tag/permalink/)

 * 3 replies
 * 3 participants
 * Last reply from: [edkoon](https://wordpress.org/support/users/edkoon/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/get-post-source-link/#post-3147285)
 * Status: not resolved