Answers for "how to find out all post of category in wordpress"

0

wp get all post categories

$categories = get_categories();
foreach($categories as $category) {
   echo '<div class="col-md-4"><a href="' . get_category_link($category->term_id) . '">' . $category->name . '</a></div>';
}
Posted by: Guest on May-31-2021
0

PHP Display Posts by Category in WordPress

$espbc = get_sub_field('add_posts_by_category');
        
        $defaults_param = array(
          //'numberposts'      	=> -1,
          'post_type'        	=> 'post',
          'category' 			    => $espbc,
          'posts_per_page' 			    => 6,
          'suppress_filters'	=> false
        );
        $catPost = get_posts($defaults_param);
Posted by: Guest on July-24-2021

Code answers related to "how to find out all post of category in wordpress"

Browse Popular Code Answers by Language