Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name: artysci
- label: Artyści
- singular_label: Artysta
- description: ""
- public: true
- publicly_queryable: true
- hierarchical: true
- show_ui: true
- show_in_menu: true
- show_in_nav_menus: true
- query_var: true
- query_var_slug: ""
- rewrite: true
- rewrite_slug: ""
- rewrite_withfront: true
- rewrite_hierarchical: true
- show_admin_column: true
- show_in_rest: true
- show_in_quick_edit: ""
- rest_base: ""
- rest_controller_class: ""
- meta_box_cb: ""
- add_action( 'woocommerce_before_shop_loop_item_title', 'add_artist_term');
- function add_artist_term() {
- $terms = wp_get_post_terms(get_the_ID(), 'artysci');
- if (!is_wp_error($terms) && !empty($terms)) { ?>
- <div class="artist-term-title"><a href="<?php echo esc_url(get_term_link($terms[0])); ?>"><?php echo esc_html($terms[0]->name); ?></a></div>
- <?php }
- }
Add Comment
Please, Sign In to add comment