bcn_paths_get_preferred_term

This function provides a means of retrieving the preferred term according to Breadcrumb NavXT Paths’ view of the world. This function was introduced in 1.6.0. It receives two parameters:

  • $post_id(int)(required) The ID of the post to retrieve the preferred term for
  • $taxonomy(string)(required) The taxonomy to retrieve the preferred term from

This function returns the WP_Term instance for the preferred term, if found. Otherwise, it returns FALSE.