Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter gombroo

    (@gombroo)

    In my loop.php file the code responsible for it looks like this:

    <div class="post_content">
     <ul class="post_meta">
     <li class="post_date"><span>On</span>&nbsp;<?php echo get_the_time('M, d, Y') ?></li>
     <li class="posted_by"><span></span>&nbsp;<?php the_author_posts_link(); ?></li>
     </ul>
     <?php the_excerpt(); ?>
     <a class="read_more" href="<?php the_permalink() ?>"><?php echo CONTINUE_READING_DOTS; ?></a>
     </div>

    Try this, as an example, I am using mqtranslate now but same applies.

    <?php the_content(‘<!–:en–>Read More…<!–:–><!–:da–>Laes mere…<!–:–><!–:de–>Lesen Sie mehr…<!–:–><!–:es–>Leer mas …<!–:–><!–:no–>Les mer …<!–:–><!–:pt–>Leia Mais …<!–:–><!–:sv–>Las mer …<!–:–><!–:fr–>Lire la suite …<!–:–><!–:nl–>Lees Meer … <!–:–><!–:it–>Leggi Tutto …<!–:–>’); ?>

    If you have languages files: *.mo, *.po,
    you can use _e() function, https://codex.www.ads-software.com/Function_Reference/_e

    Example:

    <a class="read_more" href="<?php the_permalink() ?>">
    <?php _e("Read More...","twentyfourteen"); ?>
    </a>

    or

    the_content( __( 'Continue Reading...', 'theme' ) );

    https://codex.www.ads-software.com/Translating_WordPress

    Thread Starter gombroo

    (@gombroo)

    Hi guys,
    I’ve used combination of your both advices and everything works fine!

    I’ve changed this code:

    <a class="read_more" href="<?php the_permalink() ?>">
    <?php echo CONTINUE_READING_DOTS; ?></a>

    into this:

    <a class="read_more" href="<?php the_permalink() ?>">
    <?php _e("<!--:en-->Continue Reading...<!--:-->
    <!--:pl-->Czytaj dalej...<!--:-->","butterbelly"); ?>
    </a>

    Thank you! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Translate READ MORE link’ is closed to new replies.