Kristian Nilsson
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Post Type UI] No Category Option When Creating Post.Upgraded to 5.0. No custom taxonomies in sight. Changed the settings for rest to true.
The custom taxonomies showed up.
Thanks!
Forum: Plugins
In reply to: [Category and Taxonomy Meta Fields] How to outputPerhaps you could change
(1, artiststore, true);
to ($term_id, artiststore,true);
This code does the work on my site:
Meta Key: organinfo
Meta Type: Editor
Meta Taxonomy: organisation<?php if (function_exists('wp_get_terms_meta')) { $MetaValue = wp_get_terms_meta($term_id, organinfo,true); } //meta value for meta key $meta_key echo $MetaValue; ?>
Forum: Plugins
In reply to: [Query Multiple Taxonomies] How to translate Categories and Tags in widget?Now I need to change these phrases for whole WordPress, because instead of “Categories” I will write something like “Country”
You can change “categories” to “country” in the functions.php
The method is not recommended as the terms may change in the core files in new versions of WordPress, but I haven’t encountered any problems.function notes_tagged_init() {
global $wp_taxonomies;
$wp_taxonomies[‘category’]->labels = (object) array(
‘name’ => ‘country’,
‘singular_name’ => ‘country’,
‘all_items’ => ‘All countries’,
‘edit_item’ => ‘Edit country’,
‘menu_name’ => ‘country’,
‘update_item’ => ‘Update country’,
‘add_new_item’ => ‘Add country’,
‘search_items’ => ‘Search countries’,
‘popular_items’ => ‘Popular countries’,
‘new_item_name’ => ‘New country’,
‘add_or_remove_items’ => ‘Add or remove countries’,
‘parent_item’ => null, ‘parent_item_colon’ => null,
‘choose_from_most_used’ => ‘Choose from most used country’,
‘separate_items_with_commas’ => ‘Separate countries with commas’,
);
$wp_taxonomies[‘category’]->label = ‘Country’;
}
add_action( ‘init’, ‘notes_tagged_init’ );