Tell us what you are trying to do? I have created and store custom taxonomy "event" which is associated with custom post types and term fields too. But when I try to fetch this custom taxonomy using `get_taxonomy('event')` it says invalid taxonomy.
I have tried get_terms, get_term_object etc.
I am not sure why this is happening, but I will appreciate if you can guide me through this.
hidden link
Username: Admin
Password: 4jUnDxl9H38m4O7L8sHu#^FS
You can do testing in the functions.php file of the currently active theme.
I'll appreciate if you can reply me back at "sohaib@woof.com.au"
Hello,
I have tried the credentials you provided above, it is not valid, I get this error message:
ERROR: The password you entered for the username Admin is incorrect
Is the taxonomy "event" created with Types plugin? if it is, please make sure the taxonomy is using slug "event", I have tested your codes get_taxonomy('event') in my localhost, it works fine
If you are going to retrieve the terms assigned to a specific post, you will need to try another wordpress function wp_get_object_terms()
https://developer.wordpress.org/reference/functions/wp_get_object_terms/
Retrieves the terms associated with the given object(s), in the supplied taxonomies.
Yes, I am using ToolSet to create taxonomy and taxonomy is using slug "event". I have attached the two screengrabs for you.
Plus, I just updated the password, please use the following details to log in.
link: hidden link
Username: admin
Password: *****
Plus,
just only returns the WordPress default taxonomies but not "event".
I have tried these in your website:
1) Edit the theme file functions.php, add some PHP codes to create a custom shortcode:
add_shortcode('event_tax', 'event_tax_func');
function event_tax_func($atts, $content){
$tax = get_taxonomy('event');
var_dump($tax);
}
2) Create a wordpress page to display above shortcode:
hidden link
It does output the settings of taxonomy "event", the taxonomy "event" works fine in your website
More help:
https://developer.wordpress.org/reference/functions/add_shortcode/