Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author TC.K

    (@wp_dummy)

    What is the shortcode that you use?

    Since you are using german for the translation, the language code is ‘de’ and the shohrtcode is something like this:
    [ULWPQSF id=123 lang="de=789"]
    where 123 is your english (assume it is the based language), and 798 is the form id of the german search form.

    Thread Starter gridstudio

    (@gridstudio)

    Hi..
    my shortcode is this:

    [ULWPQSF id=145 lang=”de=3568″ button=0 formtitle=”0″ divclass=my_own_class]

    Plugin Author TC.K

    (@wp_dummy)

    DId you translate the posts? I don’t see any posts in German language.

    Thread Starter gridstudio

    (@gridstudio)

    The posts are duplicated but not translated, but this is insignificant…

    Actually I realize that the query extracts the post of the English version even if you’re in the German version of the website…

    If you go to http://www.thegrandwinetour.com/de/beliebte-gerichte-italiens/ you can see the the post are linked to the deutch version (ex: the button is “mehr lesen”)

    instead if you go to http://www.thegrandwinetour.com/de/stories/ you can see that the page show the english versions posts (ex: the button is “read more”)…

    so for that reason I think that something goes wrong in the function but i can’t fix it… can you help me?

    this is my function:

    function customize_output($results , $arg, $id, $getdata ){
    
    	// The Query
    	$apiclass = new uwpqsfprocess();
    	$query = new WP_Query( $arg );
    	ob_start();	
    	$result = '';
    
    	// The Loop
    	if ( $query->have_posts() ) {
    
    		while ( $query->have_posts() ) {
    
    			$query->the_post();global $post; 
    			
    		?>
    
    			<article class="col-md-4 col-sm-6 col-xs-12 col-centered" role="article" id="post_<?php the_ID()?>">
    
    				<a href="<?php the_permalink(); ?>"><?php echo get_the_post_thumbnail($page->ID, 'thumb', array('class' => 'img-responsive')); ?></a>
    				<p class="author"><?php _e('by', 'gridtheme'); ?> <?php the_author_posts_link() ?></p>
    				<a href="<?php the_permalink(); ?>" class="block">
    
    					<h3><?php the_title(); ?></h3>
               		<p><?php echo(types_render_field("post-subtitle")); ?></p>
               		<p class="readmore button"><?php _e('Read more', 'gridtheme'); ?></p>
    
    				</a>
    
    			</article>             
    
    		<?php 
    			
    		}
    
    		echo  $apiclass->ajax_pagination($arg['paged'],$query->max_num_pages, 4, $id, $getdata);
    
    	} else { ?>
    
    		<p><?php _e('Sorry, your search returned no results.', 'gridtheme'); ?></p>
    		<a href="<?php echo get_page_link(74); ?>" class="button"><?php _e('Back to stories', 'gridtheme'); ?></a>
    	
    	<?php }
    
    	/* Restore original Post Data */
    	wp_reset_postdata();
    	$results = ob_get_clean();		
    	return $results;
    
    }
    
    add_filter('uwpqsf_result_tempt', 'customize_output', '', 4);
    

    tnx
    francesco

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘problem with wpml’ is closed to new replies.