• I am using the qTranslate plugin on cocorico.ro. I need to add a different post/page featured image for 2 diffrent languages

    In the functions.php file I have:

    if (class_exists('MultiPostThumbnails')) {
    	new MultiPostThumbnails(array(
    		'label' => 'English featured image',
    		'id' => 'english-featured-image',
    		'post_type' => 'page'
    	 ));
     }

    In the template:

    <?php  
    	if ( qtrans_getLanguage() == 'ro' ) { ?>
    		<a href="<?php the_permalink(); ?>" class="thumbnail"><?php the_post_thumbnail(); ?></a>
    	<?php  }
    	elseif ( qtrans_getLanguage() == 'en' ) { ?>
    		<a href="<?php the_permalink(); ?>" class="thumbnail">
    			<?php if (class_exists('MultiPostThumbnails')) {
    				MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'english-featured-image');
    			} ?>
    		</a> 
    <?php } ?>

    But the result of the code above is strangely a blank page from the navigation downwards? Why?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘qTranslate bug: add a different featured image for each language’ is closed to new replies.