What hooks/filters are there to alter selected terms on post save?

It is always ‘save_post’ (or ‘wp_insert_post’ immediately after this). In $_POST[‘tax_input’] you will find all the terms for all taxonomies associated with the current post. Example: ‘tax_input’ => array ( ‘location’ => array ( 0 => ‘0’, ), ), To change the terms you have to call wp_set_post_terms( $post_ID, $tags, $taxonomy ); manually, just changing … Read more

Reproducing hierarchical list output from wp_list_categories(), using get_categories()

The most ideal solution for walking over the data is to use the WordPress walker class. http://codex.wordpress.org/Function_Reference/Walker_Class You won’t find many an example around the web for using it, but one was given by Scribu here. http://scribu.net/wordpress/extending-the-category-walker.html You can also look to the classes WordPress uses to extend the walker as further examples. http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/classes.php Hope … Read more

List post from current taxonomy children

I had an idea of combining the first code with this solution that lists posts from a specifik taxomony: <?php $terms = get_terms(‘productcategories’); foreach ($terms as $term) { $wpq = array ( ‘taxonomy’=>’productcategories’, ‘term’=>$term->slug, ‘order’=>’asc’, ‘orderby’=>’title’); $query = new WP_Query ($wpq); echo “$term->name:<br />”; ?> <?php if ($query->have_posts() ) : while ($query->have_posts() ) : $query->the_post(); … Read more

Custom taxonomy admin description

I don’t know of any hooks to add or filter the metabox so you can either create your own metabox to replace the custom taxonomy metabox or in this case just use JQuery .append() for example is your taxonomy is named banners and its none – hierarchical (like tags) then: $(‘.tagsdiv-banners’).append(‘<p>your short description here</p>’); and … Read more

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