Article - Read More - button

Hi, how can I change the button-text “read more” of an article to “Mehr lesen”?

Hi Kora,

Thanks for reaching out.

To change the text of the “Read More” button to “Mehr lessen”, you need to add this code in your child theme functions.php.

function x_excerpt_string( $more ) {

    $stack = x_get_stack();

    if ( $stack == 'integrity' ) {
      return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Mehr lesen', '__x__' ) . '</a></div>';
    } else if ( $stack == 'renew' ) {
      return ' ... <a href="' . get_permalink() . '" class="more-link">' . __( 'Mehr lesen', '__x__' ) . '</a>';
    } else if ( $stack == 'icon' ) {
      return ' ...';
    } else if ( $stack == 'ethos' ) {
      return ' ...';
    }

  }
  add_filter( 'excerpt_more', 'x_excerpt_string' );

// Content More String
// =============================================================================
  function x_content_string( $more ) {

    return '<a href="' . get_permalink() . '" class="more-link">' . __( 'Mehr lesen', '__x__' ) . '</a>';

  }
  add_filter( 'the_content_more_link', 'x_content_string' );

Please note that custom development is outside the scope of our support. Issues that might arise from the use of custom code and further enhancements should be directed to a third-party developer.

Hope that helps.

Thank you.

Hi, Staff,
thank you so much! It works! And I’ve been looking for a long time!

Thousand Thanks.

Hi Kora,

You’re welcome and it’s our pleasure to help you. If you have any other concerns, feel free to reach us.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.