Hi Guido,
thanks for your response.
I only want to add the Tag to the event and Elementor should display it.
With the code taken and adapted from here, I’m able to store Tags, but they seemto be CPT-specific. Can I have a solution to add posts (no CPT) Tags?
https://wordpress.stackexchange.com/questions/62260/how-to-add-tags-to-custom-post-type
/**
* Create taxonomies tag for CPT portfolio
*/
if ( ! function_exists( 'ns_register_vsel_tags' ) ) {
function ns_register_vsel_tags() {
$labels = array(
'name' => __( 'Tags', 'ns' ),
'singular_name' => __( 'Tag', 'ns' ),
'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 Tag' ),
'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' ),
);
$args = array(
'label' => __( 'Tag', 'ns' ),
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'hierarchical' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'tag', 'with_front' => false, ),
'show_admin_column' => false,
'show_in_rest' => true,
'rest_base' => 'tag',
'rest_controller_class' => 'WP_REST_Terms_Controller',
'show_in_quick_edit' => true,
'update_count_callback' => '_update_post_term_count',
);
register_taxonomy( 'tag', array( 'event' ), $args );
}
add_action( 'init', 'ns_register_vsel_tags', 0 );
}
Thanks and kr,
Jo