• Hi all!
    I’m using qtranslate x-plugin as well as Wptouch-plugin.
    In the mobile view I can see all my languages listed in the navigation next/previous.
    I guess the used tag is not translatable (nav-bar.php). I changed the tags with <?php previous_post_link(); ?> – this works fine and only one language is shown!
    But with the next update this will be erased…

    Dear developer, could you please change the tags so that they can be translated by qtranslate x? ??

    I know there is a method to do it – Child theme…but no need for another plugin…

    Thanks in advance!
    rangi

    • This topic was modified 6 years, 6 months ago by rangitoto.
    • This topic was modified 6 years, 6 months ago by rangitoto.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Same issue here! Using qTranslateX and WPTouch.

    I replaced the content of /wp-content/plugins/wptouch/themes/bauhaus/default/nav-bar.php with:

    <?php  if ( is_single() ) { ?>
    	<div class="nav-controls clearfix">
    		
    		<?php if ( wptouch_fdn_if_previous_post_link() ) { ?>
    			<div class="previous">
    				<?php _e( 'previous post', 'wptouch-pro' ); ?>
    				<?php previous_post_link(); ?>
    				<?php //wptouch_fdn_get_previous_post_link_w_title(); ?>
    			</div>
    		<?php } ?>
    			
    		<?php if ( wptouch_fdn_if_next_post_link() ) { ?>
    			<div class="next">
    				<?php _e( 'next post', 'wptouch-pro' ); ?>
    				<?php next_post_link(); ?>
    				<?php //wptouch_fdn_get_next_post_link_w_title(); ?>
    			</div>
    		<?php } ?>
    	</div>
    <?php } ?>

    It seems the two following functions (in /wp-content/plugins/wptouch/themes/foundation/root-functions.php) should be fixed to mirror how WordPress builds these links:

    
    function wptouch_fdn_get_previous_post_link_w_title() {
    	$excluded  = wptouch_fdn_convert_catname_to_id();
    	$prev_post = get_adjacent_post( false, $excluded, true );
    	echo '<a class="prev-post" href="' . esc_url( get_permalink( $prev_post->ID ) ) . '">' . $prev_post->post_title . '</a>';
    }
    
    function wptouch_fdn_get_next_post_link_w_title() {
    	$excluded  = wptouch_fdn_convert_catname_to_id();
    	$next_post = get_adjacent_post( false, $excluded, false );
    	echo '<a class="next-post" href="' . esc_url( get_permalink( $next_post->ID ) ) . '">' . $next_post->post_title . '</a>';
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘nav-bar.php next/prev-tag translate’ is closed to new replies.