Custom taxonomies in 3 collumn
-
i working on a project where i made made custom Taxonomies, my goal is to present Amenities for a holiday appartements rental company on a post.
The ammenities i become already in my post, in functions.php i put these code:
————————————————
//hook into the init action and call create_book_taxonomies when it fires
add_action( ‘init’, ‘create_topics_hierarchical_taxonomy’, 0 );//create a custom taxonomy name it topics for your posts
function create_topics_hierarchical_taxonomy() {
// Add new taxonomy, make it hierarchical like categories
//first do the translations part for GUI$labels = array(
‘name’ => _x( ‘Topics’, ‘taxonomy general name’ ),
‘singular_name’ => _x( ‘Topic’, ‘taxonomy singular name’ ),
‘search_items’ => __( ‘Search Topics’ ),
‘all_items’ => __( ‘All Topics’ ),
‘parent_item’ => __( ‘Parent Topic’ ),
‘parent_item_colon’ => __( ‘Parent Topic:’ ),
‘edit_item’ => __( ‘Edit Topic’ ),
‘update_item’ => __( ‘Update Topic’ ),
‘add_new_item’ => __( ‘Add New Topic’ ),
‘new_item_name’ => __( ‘New Topic Name’ ),
‘menu_name’ => __( ‘Topics’ ),
);// Now register the taxonomy
register_taxonomy(‘topics’,array(‘post’), array(
‘hierarchical’ => true,
‘labels’ => $labels,
‘show_ui’ => true,
‘show_admin_column’ => true,
‘query_var’ => true,
‘rewrite’ => array( ‘slug’ => ‘topic’ ),
));}
———————————————-in the singe.php i placed folowing code:
<?php $terms_as_text = get_the_term_list( $post->ID, ‘topics’,’Topics: ‘, ‘, ‘, ” ) ;
echo strip_tags($terms_as_text); ?>(The idea is not to make the taxonomies as a link for an archive page)
———————————————
everything works as expected but i want to see the taxonomies in three colums ( 33%) , and if possible i want a small graphic before each taxonamie ( always the same graphic, like a selection icon)
Can somebody help me further?,
Thanks
- The topic ‘Custom taxonomies in 3 collumn’ is closed to new replies.