leftgg 大佬有话说 :
WORDPRESS能否根据英文标签(去除非英文)相关文章?
<?php
global $post;
$tmp_post = $post;
$tags = ”; $i = 0;
if ( get_the_tags( $post->ID ) ) {
foreach ( get_the_tags( $post->ID ) as $tag ) $tags .= $tag->name . ‘,’;
$tags = strtr(rtrim($tags, ‘,’), ‘ ‘, ‘-‘);
$myposts =get_posts(‘numberposts=’._default(‘single_num’).’&tag=’.$tags.’&exclude=’.$post->ID);
foreach($myposts as $post) {
setup_postdata($post);
?>
WORDPRESS能否根据英文标签(去除非英文)相关文章?
一个不知名网友 大佬有话说 :
我觉得好像不能 你觉得呢?