-
Author
Tagged: custom taxonomy meta list
-
April 22, 2015 at 12:12 #55565adasinParticipant
How can include the terms of a custom taxonomy in on single post meta block?
I registered the taxonomy as such:
COPY CODEadd_action( 'init', 'build_taxonomies', 0 ); function build_taxonomies() { register_taxonomy( 'levels', array('post','my_cpt'), array( 'hierarchical' => true, 'label' => 'Levels', 'query_var' => true, 'rewrite' => true ) ); }
and have experimented with the function kleo_entry_meta in child by adding:
COPY CODEif ( in_array('levels', $meta_elements ) ) { //$levels_list = get_the_term_list( $post->ID, 'levels', '', ', ', '' ); $levels_list = get_the_term_list('', __(', ', 'kleo_framework')); }
and further down the same function:
COPY CODEif ( isset( $levels_list ) && $levels_list ) { $cat_tag[] = $levels_list; }
But none of the selected terms show up in normal post. Not sure if this the right way of doing it.
Would appreciate some guidance on this.
April 22, 2015 at 16:04 #55602sharmstrModeratorIt wont show up because
COPY CODEif ( in_array('levels', $meta_elements ) ) {
will always return false unless you’ve also added “levels” to Theme Options > Blog > Display Meta Fields. Just dont check for it.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
April 23, 2015 at 14:41 #55859sharmstrModeratorJust a heads up. That function has changed in the next update. Make sure you recopy the function to your child theme after you update.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
August 17, 2015 at 01:50 #73330pandreas82ParticipantHello sharmstr,
I have a similar problem.
I have created a custom taxonomy with “Custom Post Type UI 1.1.1” plugin but there is no option to add it at “Display Meta Fields” list.
What is wrong here??
Regards,
Andreas
Attachments:
You must be logged in to view attached files.August 17, 2015 at 15:33 #73387sharmstrModeratorThey wont show up there. As the original poster indicated, you need to edit the kleo_entry_meta function.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.