我尝试修改一个Wordpress模板,在首页显示帖子。该网站使用WPML插件。这里的代码,我有现在,surprenamment的'fr'帖子是可见的主页上,但不是'en'任何想法?谢谢。
<?php
if (ICL_LANGUAGE_CODE == 'en'):
?>
<?php
$args = array(
'ignore_sticky_posts' => 1,
//'meta_key' => '_ttrust_post_featured',
//'meta_value' => true,
'posts_per_page' => $recent_posts_count,
'orderby' => 'modified',
'post__in' => array(
3986,
3971,
3980
),
'post_type' => array(
'post'
)
);
?>
<?php
elseif (ICL_LANGUAGE_CODE == 'fr'):
?>
<?php
$args = array(
'ignore_sticky_posts' => 1,
//'meta_key' => '_ttrust_post_featured',
//'meta_value' => true,
'posts_per_page' => $recent_posts_count,
'orderby' => 'modified',
'post__in' => array(
2630,
2618,
2518
),
'post_type' => array(
'post'
)
);
?>
<?php
endif;
?>
解决!代码工作 我忘了我用css:hidden隐藏部分。