How do I create a link back to the original source copy of a syndicated post

Contents

[ hide ]

    For more how-tos and advice, return to How Do I …?

    Q. How do I create a link back to the original source copy of a syndicated post?

    A. By default, FeedWordPress automatically provides a link back to the original source of syndicated posts in the permalink to each syndicated post. (The permalink is normally the link provided in the title of the post, and possibly again at the bottom.)

    Some users choose to turn off this feature, under Syndication –> Posts & Links (by changing Permalinks point to from the default setting of “the copy on the original website” to the alternative setting, “the local copy on this website.” When this is done, permalinks on your FeedWordPress-powered website will point to single-post pages on your website, which may be useful if (for example) you want to allow users to leave comments on the story at your website, or if you want to integrate content from remote sources such as a Flickr stream or a Twitter feed more naturally into the design and layout of your main website. However, now you must take some additional steps to make sure that, after the user has gotten to your single-post page, there is still some link back to the original content at its original source. There are two main ways to do this, depending on the trade-off you want to make between usability and flexibility.

    1. The “official” way to do this kind of thing in FeedWordPress — and the way to get the most flexibility and control over how the attribution is presented and what kind of information it includes — is to install one of the themes designed for FeedWordPress or to edit your own WordPress template files, so that you can add the link in the appropriate place in your Post Loop. (You can edit template files directly from the WordPress administrative interface using Appearance –> Theme Editor, or you can edit them in a text editor on your own computer and upload them to your theme directory.)

      The Templates section of the Documentation Wiki documents the template tags that FeedWordPress provides when it is activated; the most important tags for this particular task are is_syndicated() and the_syndication_permalink(). What you’d most likely be adding to your templates is a line something like this, wherever you want it added within your post loop:

      <?php if (is_syndicated()) : ?>
      <p>This is a syndicated post. Read the original at 
      <a href="<?php the_syndication_permalink(); ?>"><?php the_syndication_source(); ?>
      <?php the_time('Y-m-d'); ?></a>.</p>
      <?php endif; ?>
      

      This will create links from each syndicated post that look something like this

      This is is a syndicated post. Read the original at Rad Geek’s Projects 2010-11-08.

    2. Alternatively, if your needs are relatively limited, you can also install a FeedWordPress Add-On like the Add Attribution for FeedWordPress add-on module. Add Attribution creates an Attribution Boilerplate section under the Syndication –> Posts & Links settings page. Compared to working directly with our templates, this method causes you to lose a lot of flexibility in what you can present, and where and how you can present it; but it is handled directly through the admin interface, without having to edit template files.

    Does that answer your question? If not, use the Talk page to comment on this post or contact me by e-mail for help. Be sure to describe what you are trying to do, and the problems you are running into, with as much detail as possible.

    For more how-tos and advice, return to How Do I …?

    This page is a Wiki! Log in or register an account to edit.

    Leave a Reply

    Your email address will not be published. Required fields are marked *