get categories wordpress query
<?php
$args = array(
'taxonomy' => 'category',
'hide_empty' => 0,
);
$categories = get_categories( $args );
foreach ( $categories as $category ) {
echo '<a href="' . get_category_link( $category->term_id ) . '">' . $category->name . '</a><br />';
}
?>