在用Qtranslate 做多语言网站的时候,常常发现自己写的代码输出的时候把中英文连带语言区分的容器 “” 也移动输出了。
解决方法就是在输出是用 function __() 或 _e() 进行处理即可:
例如:
<?php $args = array( 'numberposts' => '10','category' => 1, 'post_status' => 'publish' ); $recent_posts = wp_get_recent_posts( $args ); foreach( $recent_posts as $recent ){ echo '<li><a href="' . get_permalink($recent["ID"]) . '" title="Look '.__($recent["post_title"]).'" >' . __($recent["post_title"]).'</a><span>'.$recent["post_date"].'</span></li> '; } ?>
相关文章
- Fatal error: Call to undefined function: stripos()
- WordPress function bloginfo()
- php session tmp 路径错误
- JQUERY搜索框提示效果
- DeDeCMS 在列表调用'tag'标签

Posted on 23,九 |
Posted by 姚 迎迎 












There are no comments yet