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>';
}
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>';
}
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);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us