Custom fields ‘for’ custom taxonomy?? Can someone explain why?

Custom fields for custom taxonomies are nothing more than custom templates. For example, you can remove the template of the post_tag taxonomy via remove_meta_box() function and add custom template via add_meta_box() function. Examples Remove tags template: /* Remove default post tags template. */ add_action( ‘admin_menu’ , ‘example_remove_taxonomy_template’ ); /** * Remove taxonomy template * * … Read more

Custom fields to taxonomy

You can hook into the edit form field action of that specific taxonomy. If you look in /wp-admin/edit-tag-form.php there are hooks for every taxonomy. Starting at Line 69: if ( ‘category’ == $taxonomy ) do_action(‘edit_category_form_fields’, $tag); elseif ( ‘link_category’ == $taxonomy ) do_action(‘edit_link_category_form_fields’, $tag); else do_action(‘edit_tag_form_fields’, $tag); do_action($taxonomy . ‘_edit_form_fields’, $tag, $taxonomy); So for a … Read more

Changing stylesheet depending on custom taxonomy terms

Like Justin Tadlock says in your referenced article, the body_class() provides the ability to add classes dependant on the type of term. Given that you indicate your php knowledge is still growing; this maybe the best solution. The codex provides a list of classes on a body_class enabled: http://codex.wordpress.org/Function_Reference/body_class If that isn’t sufficient; wordpress has … Read more

Displaying terms by first letter

Try this code. <?php $taxonomy = ‘authors’;// e.g. post_tag, category $param_type=”authors”; // e.g. tag__in, category__in $term_args=array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’ ); $terms = get_terms($taxonomy,$term_args); if ($terms) { $first_letter = null; foreach( $terms as $term ) { $flag = 0; if( $first_letter != substr( $term->name, 0, 1 ) ) { $first_letter = substr( $term->name, … Read more

Display direct children of the current custom taxonomy in taxonomy.php template

See the Codex. The wp_list_categories allows you to set a child_of and a depth (in this case 1, we only want to go one level down). See the link to the Codex about styling it; there’s a whole host of options. <?php $term = get_queried_object(); wp_list_categories(array( ‘taxonomy’=>$term->taxonomy, ‘child_of’=>(int) $term->term_id, ‘hide_empty’=>0, ‘depth’=>1, )); ?> I’ve only … Read more

Show all posts without a custom taxonomy

If you use WP_Query‘s tax_query, you can set the operator to NOT IN and then just list your terms. The best way to do this (IMO) is to generate the tax query separately and dynamically, since all that will be changing in each of the different arguments is the slug/id of the category name. Your … Read more

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