• I am desperately trying to change the text “read more –>” on my website to another language.

    What I have done so far is

    1. Changed text in “Content-link.php”
    <?php
    /**
    * The template for displaying posts in the Link post format
    *
    * @since 1.0.6
    */
    ?>
    <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
    <h3 class=”post-format”><?php _e( ‘<i class=”fa fa-link”></i> Link’, ‘arcade’ ); ?></h3>

    <div class=”entry-content description clearfix”>
    <?php the_content( __( ‘Read more‘, ‘arcade’) ); ?>
    </div><!– .entry-content –>

    <?php get_template_part( ‘content’, ‘footer’ ); ?>
    </article>

    Result : Nothing happened

    2. Changed text in “content.php”

    <?php
    /**
    * The default template for displaying content
    *
    * Used for both single and front-page/index/archive/search.
    *
    * @since 1.0.0
    */
    ?>
    <article id=”post-<?php the_ID(); ?>” <?php post_class( ‘clearfix’ ); ?>>
    <?php
    // Display a thumbnail if one exists and not on single post
    bavotasan_display_post_thumbnail();

    get_template_part( ‘content’, ‘header’ ); ?>

    <div class=”entry-content description clearfix”>
    <?php
    if ( is_singular() && ! is_front_page() )
    the_content( __( ‘Read more‘, ‘arcade’) );
    else
    the_excerpt();
    ?>
    </div><!– .entry-content –>
    <?php if ( is_singular() && ! is_front_page() )
    get_template_part( ‘content’, ‘footer’ ); ?>
    </article><!– #post-<?php the_ID(); ?> –>

    Result Nothing happened

    3. Changed text in functions.php

    /**
    * Adds a read more link to all excerpts
    *
    * This function is attached to the ‘wp_trim_excerpt’ filter hook.
    *
    * @param string $text
    *
    * @return Custom read more link
    *
    * @since 1.0.0
    */
    function bavotasan_excerpt_more( $text ) {
    if ( is_singular() )
    return $text;

    return ‘<p class=”excerpt”>’ . $text . ‘ ‘ . __( ‘Read more →’, ‘arcade’ ) . ‘</p>’;
    }
    endif; // bavotasan_excerpt_more

    Result : the site could not be accessed

    Any ideas what is wrong ?

Viewing 1 replies (of 1 total)
  • Hey there carlager,

    How are you doing today?

    Changing this in theme files should work for you so you should check if you have some sort of caching on your site and clear it before checking for changes.

    From the code I can see that the text is translation ready so the correct way of doing this would be using theme translation files to replace the text. You’ll find more info on how to translate theme here.

    Hope this helps 🙂

    Cheers,
    Bojan

Viewing 1 replies (of 1 total)

The topic ‘Change "Read More –>")’ is closed to new replies.