Skip to main content
2 of 4
added 294 characters in body; edited tags
J. Reynolds
  • 6.4k
  • 2
  • 18
  • 28

Limit Changed Read More Change to One Content Type

Building on this answer:

/** * Implements hook_preprocess_links(). */ function bartik_preprocess_links(&$variables) { if (isset($variables['links']['node-readmore'])) { $variables['links']['node-readmore']['link']['#title'] = t('Read more custom text'); } } 

does anyone know how to build the if statement to further limit the change in the read more link to a particular content type? I'm working in Drupal 8, not 7.