我想这对某些人来说是一件轻而易举的事-但我很难仅获取上载的目录名-而不是完整路径-我已经走到了这一步: $uploads = wp_upload_dir(); $upload_path = $uploads['baseurl']; // now how to get just the directory name? 有人有想法么?感谢您分享您的体验。。。
是否可以使用WP_Query或使用标题的query_posts创建帖子循环? 即 $args = array('post_title'='LIKE '.$str.'% '); $res = WP_Query($arg); // the loop... // trying this now... $mypostids = $wpdb->get_col("select ID from $wpdb->posts where post_title like 'Abb%' "); echo count($mypostids).", "; // works but can't echo out array of IDs for the next args? $args = array( 'post__in'=> $mypostids ); …