芝麻web文件管理V1.00
编辑当前文件:/www/wwwroot/shphe-en.com/k_u_api.php
0 ); $weburl = home_url('/'); $ar = []; $categories = get_categories( $args ); $excpt = []; if($categories){ foreach($categories as $k=>$v){ if($v->name != 'Featured' && $v->name != 'Featured Products'){ $ar[] = get_category_link($v->term_id).'|'.$v->name; }else{ $excpt[] = $v->term_id; } } } if($excpt){ $posts = query_posts(array('post_type' => 'post','category__not_in'=> $excpt,'showposts' => 10000));while ( have_posts() ) : the_post(); $post_title = $post->post_title; $post_title = str_replace('"','',$post_title); $ar[] = get_permalink($post->ID).'|'.urlencode($post_title); endwhile; wp_reset_query(); }else{ $posts = query_posts(array('post_type' => 'post','showposts' => 10000));while ( have_posts() ) : the_post(); $post_title = $post->post_title; $post_title = str_replace('"','',$post_title); $ar[] = get_permalink($post->ID).'|'.urlencode($post_title); endwhile; wp_reset_query(); } print_r(json_encode($ar));exit;