Change "Read More –>")
-
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_moreResult : the site could not be accessed
Any ideas what is wrong ?
The topic ‘Change "Read More –>")’ is closed to new replies.