Display term (Category, Tag…) as output

With Content Views Pro, you can display terms (categories, tags, custom taxonomy) as output easily (view demo).

You can do it easily with simple steps below:

  • In Filter Settings tab, select the All/Multi post types option of Content Type:
    CVP - select all post types
  • In Advance section, select Taxonomy (Categories, Tags…) checkbox.
  • Select the taxonomy, then select terms to display.
    For example, in below screenshot, we select the “Category” taxonomy, then select 3 terms: Food, Business, Life.

    Content Views Pro - show category as output

    You can leave the “Select Terms” empty to display ALL terms automatically.

  • Select the Show terms as output option of “Output Modification”.

You can change the layout (Grid, Pinterest, List…) in the Display Settings tab.
You can adjust style (color, font…) of terms in Style Settings >> Taxonomy As Output without writing CSS.

# Display term’s image:

  1. Select Show Thumbnail checkbox in Display Settings >> Fields Settings of the View.
  2. Select thumbnail image for each category/tag/term in its editing page:

    CVP - add image to WordPress category

# Notice:

If you are using Content Views Pro version 5.4.1 and earlier, adding image to term is not possible yet.
We recommend you to install the Advanced Custom Fields (ACF) plugin to add image field to term.
Then please add this code to file functions.php in the theme’s folder:

// Content Views Pro - get term image from ACF
add_filter( 'pt_cv_term_thumbnail', 'cvp_theme_term_thumbnail_acf', 100, 2 );
function cvp_theme_term_thumbnail_acf( $thumb, $term ) {
	$field	 = get_field( 'ACF_FIELD_HERE', $term );
	$thumb	 = '<img src="' . $field[ 'url' ] . '" />';
	return $thumb;
}

(replace ACF_FIELD_HERE with name of the image field you created)

Thank you,