Tag: sitemap

  • 自制WordPress Sitemap Page Template

    自制WordPress Sitemap Page Template

    代码片段: <?php $cat_and_art = $wpdb->get_results(“SELECT t.term_id FROM  $wpdb->terms t left join $wpdb->term_taxonomy tt on tt.term_id = t.term_id WHERE tt.taxonomy= ‘category’ and tt.parent=’0′ and tt.count > 0″); foreach ($cat_and_art as $cat_and_art_id) { $category_id[] = $cat_and_art_id->term_id; } //print_r($category_id); for($c_id = 0; $c_id < strlen($category_id); $c_id++ ){ ?> <li><?php echo(get_category_parents($category_id[$c_id], TRUE, ”)); ?> <ul> <?php /* EDIT THE…