Please make sure to update to WPML 4.3.4 before reporting any issue

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by Anonymous 8 years ago.

Author Posts
November 9, 2011 at 3:30 pm #40035

Steven

I've recently purchased a theme FOLIOWAY and WPML can't translate the homepage.
hidden link
The slider will not translate (wpml media translate is installed)
And the Latest Works won't translate because you have to define what shows in that section. But there is no way to define what shows in that section per language.
The author says that he contacted WPML and the issue is in their hands because it is WPML causing the problem.
WPML told me to post in this forum for help.
This is not the first theme that I've used that WPML has trouble with the homepage.
Any theme that allows me to define the homepage "page" works fine.
But alot of themes homepages are widgetized or preprogrammed.
Any help or advise out there in WPML land concerning this Folioway theme?

November 9, 2011 at 4:00 pm #40037

Anonymous

Steven
1) Who they contacted with? You can ask them to write me: daniel.d@wpml.org
2) Can you paste here the code thats making the query for the slider?

November 10, 2011 at 2:43 am #40038

Steven

SLIDER:
<?php if(!$iwak->o['home']['place_slider']) return; ?>
<div id="featured">
<!-- <div class="background"></div> -->
<div class="inner">
<?php $featured_posts = iwak_get_list('featured_posts'); if( !empty($featured_posts) ): global $post; $class=' active';
foreach( $featured_posts as $featured_post )
$id_list[] = $featured_post['id'];
$q = query_posts(array('posts_per_page'=>-1,
'ignore_sticky_posts'=>1,
'post_type'=>'any',
'post_status' =>'inherit,publish',
'post__in'=>$id_list)
);
foreach($q as $featured_post) {
$posts[$featured_post->ID] = $featured_post;
}
foreach( $featured_posts as $index=>$featured_post ):
$post = $posts[$featured_post['id']];
setup_postdata($post); $image = $iwak->get_post_image_url(); $thumbs[] = $image;
$href = $featured_post['image_link'] ? $featured_post['image_link']: get_permalink(); ?>
<div id="featured-<?php echo $index;?>" class="featured-entry<?php echo $class; unset($class); ?>" >
<?php if($href == 'none'): $iwak->the_thumbnail($image, array(940, 390)); else: ?>
<a title="">"><?php $iwak->the_thumbnail($image, array(940, 390)); ?><div class="indicator"></div></a>
<?php endif; ?>
</div>
<?php
endforeach; ?>
<?php endif; ?>
<?php if(isset($thumbs)): $sections = count($thumbs); $section_width = floor(940/$sections); ?>
<div class="console-wrapper">
<div class="progressbar"><span></span></div>
<ul class="console">
<?php foreach($thumbs as $index=>$thumb)
echo '<li style="width:'. $section_width. 'px" class="thumb thumb-'. $index. '"><span class="number">'. sprintf('%02d', $index + 1). '</span>'; ?>
<div class="clear"></div>
<span class="slider-btn slider-btn-play"></span>
</div>
<?php endif; wp_reset_query(); ?>
</div><!-- .inner -->
</div><!-- #featured -->
<script type="text/javascript">
/*jQuery(document).ready(function() {
//jQuery("#featured-0 .fl, #featured-0 .fr").css('display', 'none');
//jQuery('#featured .inner').css('background', 'transparent url(' + '<?php echo THEME_URL; ?>' + '/images/slider-loader.gif) no-repeat 50% 50%');
});*/
jQuery(window).load(function() {
var progress = jQuery('div.progressbar span');
var current = 0;
var autoplay = <?php echo $iwak->o['featured']['autoplay']; ?>;
var duration = <?php echo $iwak->o['featured']['autoplay_duration'] * 1000; ?>;
var sections = <?php echo $sections; ?>;
var section_width = <?php echo $section_width; ?>;
var interval = (duration*sections)/940;
var pause_on_hover = <?php echo $iwak->o['featured']['pause_on_hover']; ?>;
var settings = <?php echo json_encode($featured_posts) ?>;
var featured_posts = jQuery('#featured .featured-entry');
var numbers = jQuery('ul.console .number');
var timer;
if(sections < 2)
return;
jQuery('.console-wrapper').fadeIn();
// Navigation Actions
jQuery.fn.highlight = function() {
if(!jQuery(this).hasClass('active')) {
selected = jQuery(this);
jQuery("ul.console .active").removeClass('active');
selected.addClass('active');
}
}
var activate = function(number) {
called = number;
// Hide current featured item
out_duration = parseInt(settings[current]['animation']['out_duration']);
jQuery(featured_posts[current]).fadeOut(out_duration);
// Light up the navigation button corresponding to the featured item passed in
jQuery(numbers[called]).highlight();
// Activate the featured item passed in
in_duration = parseInt(settings[called]['animation']['in_duration']);
jQuery(featured_posts[called]).fadeIn(in_duration);
}
var start = function() {
timer = setInterval(function() {
w = progress.width();
if(w == 940) {
progress.width(0);
activate(0);
current = 0;
} else {
progress.width(w + 1);
next = Math.floor(w/section_width);
if( next == current + 1 && next < sections ) {
// alert('next: ' + next + ' current: ' + current);
activate(next);
current = next;
}
}
}, interval);
}
if(autoplay) {
jQuery('.console-wrapper .slider-btn').toggleClass('slider-btn-play');
start();
}
if(pause_on_hover) {
jQuery("#featured .featured-entry").mouseenter(function() {
if(timer) {
clearInterval(timer);
timer = false;
}
});
jQuery("#featured .featured-entry").mouseleave(function() {
if(!jQuery('.console-wrapper .slider-btn').hasClass('slider-btn-play') && !timer) start();
});
}
jQuery("ul.console .number").click(function() {
if(jQuery(this).hasClass('active'))
return;
if(timer) {
clearInterval(timer);
timer = false;
}
index = jQuery("ul.console .number").index(this);
activate(index);
current = index;
progress.animate({width: index*section_width}, function() { if(!timer) start();});
jQuery(this).highlight();
});
jQuery("ul.console .number:first").addClass('active');
jQuery('.console-wrapper .slider-btn').click(function() {
if(jQuery(this).hasClass('slider-btn-play') && !timer) {
start();
}
else if(!jQuery(this).hasClass('slider-btn-play') && timer) {
clearInterval(timer);
timer = false;
}
jQuery(this).toggleClass('slider-btn-play');
});
if(!(jQuery.browser.msie && jQuery.browser.version < 9)) { // exclude ie8- because of their poor support for png
jQuery('#featured a').hover(function() {
jQuery('.indicator', this).fadeIn('slow');
}, function() {
jQuery('.indicator', this).fadeOut();
});
}
});
</script>
-----------------------------------------------------------------
LATEST WORKS
<div id="latest-works" class="panel works panel-works">
<?php global $iwak; $posts_per_belt = $iwak->o['home']['posts_per_belt'] > 24 ? 24 : $iwak->o['home']['posts_per_belt'];
//$latest_works = new WP_Query(array('post_type'=>'portfolio', 'posts_per_page' =>$posts_per_belt, 'pcat'=>$iwak->o['home']['belt_works_category']));
if(!empty($iwak->o['home']['belt_works_category'])) {
$works = "($wpdb->posts.post_type = 'portfolio' AND $wpdb->posts.post_status = 'publish'";
if($iwak->o['home']['belt_works_category'] != -1)
$works .= "AND $wpdb->term_taxonomy.taxonomy = 'portfolio_category' AND $wpdb->terms.term_id = {$iwak->o['home']['belt_works_category']}";
$works .= ")";
$where[] = $works;
}
if(!empty($iwak->o['home']['belt_posts_category'])) {
$posts = "($wpdb->posts.post_type = 'post' AND $wpdb->posts.post_status = 'publish'";
if($iwak->o['home']['belt_posts_category'] != '-1')
$posts .= " AND $wpdb->term_taxonomy.taxonomy = 'category' AND $wpdb->terms.term_id = {$iwak->o['home']['belt_posts_category']}";
$posts .= ")";
$where[] = $posts;
}
$where = isset($where) ? 'WHERE '. join(' OR ', $where) : '';
//showinfo($where);
$querystr = "
SELECT *
FROM $wpdb->posts
LEFT JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id)
LEFT JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
LEFT JOIN $wpdb->terms ON ($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id)
$where
GROUP BY $wpdb->posts.ID
ORDER BY $wpdb->posts.post_date DESC
LIMIT 0, $posts_per_belt
";
$latest_works = $wpdb->get_results($querystr, OBJECT);//var_dump($similar_works);//new WP_Query(array('post_type'=>'portfolio', 'posts_per_page' =>$iwak->o['home']['posts_per_belt'], 'pcat'=>array_keys($pcats), 'post__not_in'=>(array)get_the_id())); ?>
<h3><?php _e('Projets récents', THEME_NAME); ?></h3>
<ul class="belt">
<?php $iwak->list_posts($latest_works, array('itemtag'=>'li', 'num_of_posts'=>-1, 'more_text'=>'', 'thumbnail_size'=>array(220, 205), 'show_excerpt'=>0, 'group_size'=>0, 'show_morelink'=>1, 'show_categories'=>1)); ?>
<span class="more"><a></a></span>
</div>

November 11, 2011 at 11:43 am #40039

Anonymous

There is function: iwak_get_list('featured_posts'); that they need to modify to be WPML compatible... Any chance to work with them on doing this?

The topic ‘[Closed] What to do when WPML can't translate theme homepage’ is closed to new replies.