Hello,

Is there a way to remove the 'more' link in the Aggregator block?

Thanks for the help.

Comments

dvessel’s picture

The simplest way is to use CSS by targeting the specific block then ".read-more" and applying the rule "display:none". Doing it through the back-end is not easy due to how it is formed.

.block-aggregator .read-more {
  display: none;
}

As usual, use Firebug to double check the selector to use.

joon park

brutus765’s picture

Thanks, it works perfectly with :

.block-aggregator .more-link {
display: none;
}

Regards.

patchak’s picture

Hi,

when I look in firebug I only see the general controller for all "more' links. There does not seem to be any spcial controller for the aggregator block? Any way to work around this, I don't want to hode all more links on the sidebar :)

Patchak

szy’s picture

Do we have any other possibility to remove 'more' link in aggregator blocks?
Could it be an option in block settings?

CSS method is not as good as it should be - spiders still see it and get whole
feed's items list...

Szy.

OneTwoTait’s picture

subscribing

Anonymous’s picture

There definitely should be a clean way to suppress the more link at the HTML level. Hiding it from readers is a step, but it doesn't hide it from spiders, which is a real issue for SEO. A site could get penalized for duplicating foreign content.

IbnDrupal’s picture

No amount of googling is getting me anywhere near to solving this problem

IbnDrupal’s picture

Here is a way to do this in D6.

Enter the following into your theme template.php files. Don't forget to replace themename with the name of your theme.

function themename_more_link ($url, $title) {
  if (stristr( $url, 'aggregator')) {
    return "";
  } 
} 
texas-bronius’s picture

In my case, I just needed to capitalize the link text "more" to be "More". What worked out for me was:
text-transform:capitalize;
Sweet.

--
http://drupaltees.com
80s themed Drupal T-Shirts

Anonymous’s picture

This worked for me!

It would still be good to have a way to turn this misfeature off in the admin interface, for people who don't want to hack php files.

idebill’s picture

This is exactly what I was looking for. Worked like a charm.

ClaudeS-1’s picture

function themename_more_link ($array)
{
   if (stristr( $array['url'], 'aggregator'))
   {
      return "";
   }
}
Ulrich Palha’s picture

Just had to clear the cache to see the changes.

smileeman2002’s picture

Got it. Template.php.

Thanks all.

smileeman2002’s picture

What file do I have to update to change this code? I am using D7.

Anonymous’s picture

I've filed a feature request against D8 core: #1613382: Option to suppress aggregator content duplication, to improve SEO.

This seems like a must-have.

Cleanshooter’s picture

You can reproduce the original function from theme.inc and modify the output.

In my example I change "More" to "VIEW ALL HEADLINES".

function yourtheme_more_link ($variables)
{
   return '<div class="more-link">' . l(t('VIEW ALL HEADLINES'), $variables['url'], array('attributes' => array('title' => $variables['title']))) . '</div>';
}

this again is done in your theme.php file.

gurtner’s picture

Thanks for posting this. It helped me fix the output of the link. However, now the link goes to the index of my site instead of to the actual link for the feed or the feed page.. any suggestions?

danielgurtner.com

potassiumchloride’s picture

For anyone else who stumbles on this thread...use Views to create your own output of the feed. Create a new view of aggregator items, and add desired fields (such as title and date). You can use the footer for containing a link to more (all) items on the source page, etc.