Viewing 1 replies (of 1 total)
  • Thread Starter luciandavidescu

    (@luciandavidescu)

    Here’s what I got, with decisive help from stackoverflow.

    $categories = get_the_category( $post->ID );
    $categories = wp_list_pluck($categories,'term_id');
    $nocats = get_terms(  'category',   array(    'exclude' => $categories,    'hide_empty' => false  ) );
    foreach ( $nocats as $nocat ) {  echo $nocat->name;  echo ","; }
Viewing 1 replies (of 1 total)

The topic ‘Only include posts from current category/tag’ is closed to new replies.