bedava hesaplar nulled scripts mod apk indir mail kaydol youtube mp3 dönüştürücü

Taxonomy Template for custom Taxonomy in Portfolio

Hi,

I managed to register in functions.php a fully functional custom taxonomy "custom_tags" to my Portfolio.

However, the archive pages for this taxonomy will not display the default Portfolio Archive Taxonomy template, but the Blog one.

I have some questions, to understand the way Betheme is working to replicate / modify a Template,

1) Should I work with a copy of taxonomy-portfolio-types.php OR template-portfolio.php?

2) Should I make create a new template, i.e. portfolio-tags.php or modify the file?

3) Would be enough to substitute the "portfolio_classe" for my "custom_tags"?

4) Do I need to register it in some other theme template?




As reference here my code in functions.php for a custom Taxonomy for Betheme Portfolio:


/*** Add PORTFOLIO Taxonomy ***/

add_action( 'init', 'create_custom_tag_taxonomies', 0 );

//create two taxonomies, genres and tags for the post type "tag"

function create_custom_tag_taxonomies() 

{

 // Add new taxonomy, NOT hierarchical (like tags)

 $labels = array(

  'name' => _x( 'Tags', 'taxonomy general name' ),

  'singular_name' => _x( 'Tags', 'taxonomy singular name' ),

  'search_items' => __( 'Search Tags' ),

  'popular_items' => __( 'Popular Tags' ),

  'all_items' => __( 'All Tags' ),

  'parent_item' => null,

  'parent_item_colon' => null,

  'edit_item' => __( 'Edit Tag' ), 

  'update_item' => __( 'Update Tag' ),

  'add_new_item' => __( 'Add New' ),

  'new_item_name' => __( 'New Tag Name' ),

  'separate_items_with_commas' => __( 'Separate tags with commas' ),

  'add_or_remove_items' => __( 'Add or remove tags' ),

  'choose_from_most_used' => __( 'Choose from the most used tags' ),

  'menu_name' => __( 'Tags' ),

 ); 

 register_taxonomy('custom_tags','portfolio',array(

  'hierarchical' => false,

  'labels' => $labels,

  'show_ui' => true,

  'update_count_callback' => '_update_post_term_count',

  'query_var' => true,

  'rewrite' => array( 'slug' => 'ukv' ),

 ));

}




Thanks in advance,

Miguel

Please sign in to unlock conversation.

If you don't have an account yet, please register now