$term->taxonomy stripping out underscores

WordPress sees underscore names as relating to post types and dashes as relating to taxonomies. Perhaps this has something to do with it? Also, have you flushed your permalinks recently (change the permalink structure to something else and then back)? It might be stuck in your database with the “sanitized” taxonomy name. This has happened … Read more

Any way to make custom taxonomy field searchable?

Here’s the code. You can change $post_type and $custom_fields according to your needs. function extend_admin_search( $query ) { // Extend search for document post type $post_type=”document”; // Custom fields to search for $custom_fields = array( “_file_name”, ); if( ! is_admin() ) return; if ( $query->query[‘post_type’] != $post_type ) return; $search_term = $query->query_vars[‘s’]; // Set to … Read more

Error in Custom Taxonomy UI

The issue at first glance appears to be here.. add_action(‘game_edit_form_fields’, ‘game_form_fields’); add_action(‘game_add_form_fields’, ‘game_form_fields’); function game_form_fields($tag,$taxonomy) { Your function is expecting 2 vars to be passed from the hook, but your add_action calls default to 1.. Eg, this.. add_action(‘game_edit_form_fields’, ‘game_form_fields’); Is equal to this.. add_action(‘game_edit_form_fields’, ‘game_form_fields’, 10, 1 ); The fourth parameters sets how many arguments … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)