Sunday, April 24, 2011

Permalink tweaking in FeedWordPress plug-in based wordpress sites



We are using FeedWordPress plug-in for showing latest news in some of our websites (rilbp.info, VerizonIphoneGuide.info

Till today, the FeedWordpress plug-in setting was done so as to have the original source url as the permalink of the post.

This setting won't allow our visitors to share our posts with their social bookmarking sites. So, I wanted to change the permalink. When I do the change in the plug-in settings for taking the local permalink, there was no way for the users to go to the original source page.

So, I have made small change in the single.php of the template.

I replaced "<?php the_content();?> with below piece of code.


<?php //For showing original source link
$originalurl=trim(get_syndication_permalink($post->ID));
$readmorelink="<a href='".$originalurl."'>Read from Source</a>";
the_content();
$pagetitlelink=trim(get_permalink());

if ($originalurl!="")
{
echo "<h3>".$readmorelink."</h3>";
}
?>


You can bookmark this blog for further reading, or you can subscribe to our blog feed.

No comments:



Thanks for visiting our blog


twitterrss facebook linkedin YouTube subscribe


Subscribe via email

Enter your email address: