How to perform unit testing on proposed patches in Trac?
I really found this presentation from WCSF to be extremely helpful. http://wordpress.tv/2011/08/20/nikolay-bachiyski-unit-testing-will-change-your-life/
I really found this presentation from WCSF to be extremely helpful. http://wordpress.tv/2011/08/20/nikolay-bachiyski-unit-testing-will-change-your-life/
SQL query for renaming the posts: UPDATE `wp_posts` SET `post_type` = ‘<new post type name>’ WHERE `post_type` = ‘<old post type name>’; SQL query for renaming taxonomy: UPDATE `wp_term_taxonomy` SET `taxonomy` = ‘<new taxonomy name>’ WHERE `taxonomy` = ‘<old taxonomy name>’; That should take care of all of the database areas. Just remember to match … Read more
The simple answer is that terms in hierarchical taxonomies can have child terms. But what else? ‘hierarchical’=>false When you specify a ‘hierarchical’=>false you get the following type of metabox which is the metabox format WordPress also uses for Post Tags: ‘hierarchical’=>true However when you specify ‘hierarchical’=>true you get the following type of metabox which is … Read more
I added new field ‘picture’ (input type file) to category with help of these add_action(‘category_edit_form_fields’,’category_edit_form_fields’); add_action(‘category_edit_form’, ‘category_edit_form’); add_action(‘category_add_form_fields’,’category_edit_form_fields’); add_action(‘category_add_form’,’category_edit_form’); function category_edit_form() { ?> <script type=”text/javascript”> jQuery(document).ready(function(){ jQuery(‘#edittag’).attr( “enctype”, “multipart/form-data” ).attr( “encoding”, “multipart/form-data” ); }); </script> <?php } function category_edit_form_fields () { ?> <tr class=”form-field”> <th valign=”top” scope=”row”> <label for=”catpic”><?php _e(‘Picture of the category’, ”); ?></label> … Read more
Your tax query is incorrect, field should be the field you want to query on: term_id, name, or slug – $posts_array = get_posts( array( ‘posts_per_page’ => -1, ‘post_type’ => ‘fabric_building’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘fabric_building_types’, ‘field’ => ‘term_id’, ‘terms’ => $cat->term_id, ) ) ) );
Use wp_list_categories with the ‘taxonomy’ => ‘taxonomy’ argument, it’s built for creating hierarchical category lists but will also support using a custom taxonomy.. Codex Example: Display terms in a custom taxonomy If the list comes back looking flat, it’s possible you just need a little CSS to add padding to the lists, so you can … Read more
Taxonomies, as previously described are a collective noun for the following category post_tag post_format link_category custom taxonomy The first four are built-in taxonomies, while custom taxonomies are taxonomies that are manually created by the user with register_taxonomy. Custom Taxonomies can be hierarchical (like the build-in taxonomy category) or not (like post tags) The categories and … Read more
I think I’ve got it! After looking at couple of functions in the taxonomy.php file in WordPress I have found the function get_object_taxonomies(); which did the trick 🙂
No, it is not possible to order by taxonomy, because from a certain type of standpoint, that doesn’t actually make much sense. Taxonomies are ways to group things together. So the point of having a taxonomy on posts would really be to have terms in that taxonomy that are shared between posts. If a taxonomy … Read more