I've just created a custom post type for speakers (motivational, financial, political, etc) and, when I post a new speaker, I have it set up that I can select their area(s) of speaking expertise (motivational, financial, political, etc). Well, what I'd like to do is display the chosen taxonomies on the speaker's profile page in an auto-generated two column layout. Say something like 5 or 6 items (taxonomies) per column.
I created the custom post types using Toolset and I'm using Beaver Builder and Beaver Themer to build out the front-end.
An example of the "Areas Of Expertise" (custom taxonomies) columns I'm looking to display can be seen at the link below under the "Add To List" and "Share" buttons.
Example page: [][1]
Anyone know how I can make this happen?
I've just created a custom post type for speakers (motivational, financial, political, etc) and, when I post a new speaker, I have it set up that I can select their area(s) of speaking expertise (motivational, financial, political, etc). Well, what I'd like to do is display the chosen taxonomies on the speaker's profile page in an auto-generated two column layout. Say something like 5 or 6 items (taxonomies) per column.
I created the custom post types using Toolset and I'm using Beaver Builder and Beaver Themer to build out the front-end.
An example of the "Areas Of Expertise" (custom taxonomies) columns I'm looking to display can be seen at the link below under the "Add To List" and "Share" buttons.
Example page: [https://nationalspeakers/mel-robbins][1]
Anyone know how I can make this happen?
Share Improve this question asked May 3, 2019 at 21:33 AlonsoF1AlonsoF1 437 bronze badges1 Answer
Reset to default 0I'm not familiar with Beaver Builder or Beaver Themer, but this can be done easily using wp_get_post_terms()
. It sounds like you are confusing "taxonomy" with "terms". The taxonomy is the "Areas of Expertise" that you created, the terms are each of the terms that you created in that taxonomy and assigned to any given post. On the single speaker page template you would query the terms for that taxonomy and then output the results in your desired markup like this:
$terms = wp_get_post_terms($post->ID, 'expertise_taxonomy');
echo '<ul>';
foreach($terms as $term){
echo '<li>'.$term->name.'</li>';
}
echo '</ul>';
Adjust for whatever taxonomy slug, desired markup, classes etc. that you need/want. See WP_GET_POST_TERMS for reference.