[Plugin: Taxonomy Terms List] Help me again
-
the problem is the alignment, i am not able to adjust the alignment, check the image
https://i52.tinypic.com/fjlzz6.jpg
in this mba_courses and Location are not in proper order, i tried table tag but not getting perfect in it,the plugin code will include all the custom taxonomies, but if i just want to display certain custom taxonomies then how can i do that?
this will make me to display and align them in proper order here is my edited code<?php if( !function_exists( 'pr' ) ) { function pr( $var ) { print '<pre>' . print_r( $var, true ) . '</pre>'; } } if( !function_exists( 'mfields_taxonomy_terms_list' ) ) { function mfields_taxonomy_terms_list( $c ) { global $post; $o = ''; $terms = array(); $lists = array(); $custom_taxonomy_names = array(); $custom_taxonomies = mfields_get_custom_taxonomies(); if( !empty( $custom_taxonomies ) ) foreach( $custom_taxonomies as $name => $config ) $custom_taxonomy_names[] = $config->name; if( !empty( $custom_taxonomy_names ) ) $terms = get_terms( $custom_taxonomy_names ); foreach( $custom_taxonomies as $name => $config ) $o.= get_the_term_list( $post->ID, $name, $before = '<p><span class="mfields-taxonomy-term-list-name">' . $config->label . ':</span> ', $sep = ', ', $after = '</p>' ); if( is_single() ) return $c . $o; return $c; } add_shortcode('terms', 'mfields_taxonomy_terms_list'); } if( !function_exists( 'mfields_get_custom_taxonomies' ) ) { function mfields_get_custom_taxonomies( ) { global $wp_taxonomies; $custom_taxonomies = array(); $default_taxonomies = array( 'post_tag', 'category', 'link_category' ); foreach( $wp_taxonomies as $slug => $config ) if( !in_array( $slug, $default_taxonomies ) ) $custom_taxonomies[$slug] = $config; return $custom_taxonomies; } } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Taxonomy Terms List] Help me again’ is closed to new replies.