How to display data in archive page?

You can use the_terms function in WP to display your term values in your archive page.

Usage

the_terms( $id, $taxonomy, $before, $sep, $after );

Parameters

  • $id (int|req) -> Post ID. Default: None
  • $taxonomy (str|req) -> Taxonomy name. Default: None
  • $before (str|opt) -> Text to display before tags are displayed. Default: Empty string
  • $sep (str|opt) -> Text or character to display between each tag link. Default: ‘, ‘
  • $after (str|opt) -> Text to display after the last tag. Default: Empty string

WP : Function Reference/the_terms