WordPress.org

Ready to get started?Download WordPress

Forums

WPeMatico
Get post source link? (4 posts)

  1. jzatt
    Member
    Posted 1 year ago #

    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/

  2. yukiko-kawa
    Member
    Posted 1 year ago #

    Like him, I need a nice clear link at the real news.
    I use personal theme

  3. jzatt
    Member
    Posted 1 year ago #

    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();

  4. FidoSysop
    Member
    Posted 1 year ago #

    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/

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic