Prevent automatic translation

open (3 posts) (2 voices)

  1. tanteidee
    Member

    Hi!

    I’m using Echelon + Advanced Custom Fields + Transposh and I need to prevent automatic translation if I set No Translate on the post by a radio button created with Advanced Custom Fields.

    I can do that with this code

    <?php
    if (get_field('translate') == 'No') {
    	echo '<span class="no_translate">';
    } else {
    	echo '';
    }
    ?>
    
    <?php mysite_before_entry(); ?>
    
    <div class="entry">
    
    <?php the_content(); ?>
    
    <?php
    if (get_field('translate') == 'No') {
    	echo '</span>';
    } else {
    	echo '';
    }
    ?>

    on single.php and is OK.

    I need to implement the same code to prevent translation of the title bar, on theme.php I found this code

    $doctitle = mysite_seo_replace( '%post_title%', $post );

    but I don’t know how implement my previous code.

    I need to prevent translation also for Title and Post Excerpt when use blog_list thumb="medium”, but I don’t know how implement my previous code.

    Can you tell me how can do that?

    Thanks!

    Posted 1 year ago #
  2. not sure why you wnat to prevent translation, why not just translate it by placing the text you want in there

    Posted 1 year ago #
  3. tanteidee
    Member

    Sorry for the delay, but I need to find a way to prevent translation of the title bar, on theme.php, how to do?

    Posted 1 year ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme