WordPress.org

Ready to get started?Download WordPress

Forums

WP nivoSlider Loads English only also in other languages (1 post)

  1. rabiaah
    Member
    Posted 1 year ago #

    Hi All,

    I'm facing a problem, I have installed WPML and the Radio button selected as Translate for the slider in WPML Translation Options.

    I already have 4 Slides, 2 in English and other 2 in Arabic, When access the Website in both Languages, I keep loads the slides in English only.

    I tried lot of tricks and solutions but nothing help.

    PLEASE ADVICE WHAT CODE I HAVE TO SUPPORT.

    The following peace of code returns all the time both English Posts only..

    query_posts("post_type=slider&post_status=publish&posts_per_page=-1");

    Full Source code for slider.php:

    <div id="slider" class="nivoSlider">
    	<?php
    		query_posts("post_type=slider&post_status=publish&posts_per_page=-1");
    		while ( have_posts() ) : the_post();
    	?>
    	<?php
    		$custom = get_post_custom($post->ID);
    		$url = get_post_custom_values("slider-url");
    		$sl_thumb = $custom["thumb"][0];
    		$sl_caption = $custom["caption"][0];
    		echo $post->ID;
    	?>
      <?php if(has_post_thumbnail( $the_ID) || $sl_thumb!=""){ ?>
      <?php
    		if($sl_thumb!=""){
    			echo "<a href='" . $url[0] . "'>";
    			echo "<img src='" . $sl_thumb . "' alt='' title='" . $sl_caption . "' />";
    			echo "</a>";
    		} else{
    			echo "<a href='" . $url[0] . "'>";
    			the_post_thumbnail( 'slider-post-thumbnail' );
    			echo "</a>";
    		}
    		?>
      <?php } ?>
      <?php endwhile; ?>
    </div>
    <?php wp_reset_query();?>

    [Please post code or markup between backticks or use the code button. Or better still - use a pastebin. Your posted code may now have been permanently damaged/corrupted by the forum's parser.]

    Sincerely yours,

    Rabia Abu Hanna

    [No bumping, thank you.]

Topic Closed

This topic has been closed to new replies.

About this Topic