Support » Fixing WordPress » excerpts with permalinks on aggregated posts in single.php

  • jjese


    I am setting up my news/magazine website consisting of original content by me and other authors writing specifically for my site PLUS numerous links and excerpts from similar aggregated sources. The biggest trouble I am having with my website right now is setting it up so I do not get into trouble for posting more than authorized by the original source (I am trying to post only an excerpt while still perma-linking to the original source). I want my front page of my site which is using the Newspaper-Times theme. (Here is a link to that theme’s demo page to show links and sometimes short excerpts of aggregated news articles. But when they are clicked on, I do not want them to go to the original source. Instead, I want them to go to where my aggregation has posted it to a single page (single.php). Still, even on that page, I do not want the full content. I want an excerpt where a “read more” link will take them to the original source (via a target = “new” tag when leaving my site).

    I use the plug-in to WPeMatico aggregate my links and I can put my feeds into one or more categories. It also allows me to add a permalink to the original source.

    I was able to change the single.php file to read as follows:
    <? Php the_content ();?>

    <? Php if (in_category (‘8 ‘)) {?>
    <? Php the_excerpt ();?> <? Php} else {?>
    <? Php the_content ();?>
    <? Php}?>

    where ‘8 ‘is the aggregated category. This allows my original content that I write to go straight to full content while the aggregated links are simply excerpts. Unfortunately, doing it this way wipes out (or more Appropriately cut’s off) the permalinks to the original source on the excerpts for the aggregated material.

    Additionally if I add the wordpress “see more” permalink is to my single page with the excerpt, it just recycles that single page because it’s the post page. I want to know how to add a permalink to the original source if the post is category ‘8’.

    What it boils down to is figuring out how to get my single.php to show excerpts with permalinks to the original material which I have aggregated from outside my site, but have my personal content to show full content (without the “see more” link on the full content).

    If you are wondering my purpose for this, I want more exposure to my site and ads and affiliate marketing on my site, but want people Attracted to my site by way of the type of news aggregating That I Am. I do not want to violate any Infringement of posting full content, Regardless of any improbability of getting caught.

    Here are some sites That Have the excerpts on the single.php with a permalink to the original source.

    #wordpress #css #php

  • The topic ‘excerpts with permalinks on aggregated posts in single.php’ is closed to new replies.