Just need to use get_categories and a foreach
$cats = get_categories();
if ( !empty( $cats ) && !is_wp_error( $cats ) ){
foreach ( $cats as $cat ) {
echo '<h1 class="categoryTitle"><a href="'.get_category_link( $cat->term_id ).'">'.$cat->name.'</a></h1>';
echo '<p class="cateSubTitle">'.$cat->description.'</p>';
}
}
To Add each one in it’s own div, just add a tag after the foreach e.g.
$cats = get_categories();
if ( !empty( $cats ) && !is_wp_error( $cats ) ){
foreach ( $cats as $cat ) {
echo '<div class="divname" id="'.$cat->slug.'">';
echo '<h1 class="categoryTitle"><a href="'.get_category_link( $cat->term_id ).'">'.$cat->name.'</a></h1>';
echo '<p class="cateSubTitle">'.$cat->description.'</p>';
echo '</div>';
}
}
There is a class so you can target all the divs at once, and each one has an id so you can target them individually, the id is the category slug e.g. toms-category