"Display Categories Name And Description"
Bootstrap 4.1.1 Snippet by Arjunverma

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <h2>Create your snippet's HTML, CSS and Javascript in the editor tabs</h2> </div> </div>
function wpb_catlist_desc() { $string = '<ul>'; $catlist = get_terms( 'category' ); if ( ! empty( $catlist ) ) { foreach ( $catlist as $key => $item ) { $string .= '<li>'. $item->name . '<br />'; $string .= '<em>'. $item->description . '</em> </li>'; } } $string .= '</ul>'; return $string; } add_shortcode('wpb_categories', 'wpb_catlist_desc');

Related: See More


Questions / Comments: