Skip to content

Instantly share code, notes, and snippets.

@a2ikm
Last active December 16, 2015 21:29
Show Gist options
  • Select an option

  • Save a2ikm/5500239 to your computer and use it in GitHub Desktop.

Select an option

Save a2ikm/5500239 to your computer and use it in GitHub Desktop.
<?php
$cat_all = get_terms( "category", "fields=all&get=all" );
foreach($cat_all as $value):
if($value->term_id === 1) { continue; } // id=1のカテゴリをスキップ
if($value->name === "ナマハゲ") { continue; } // name=ナマハゲのカテゴリをスキップ
?>
<p><a href="<?php echo get_category_link($value->term_id); ?>"><?php echo $value->name;?></a></p>
<?php endforeach; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment