How can I set a default listing order on the admin page for a custom taxonomy? (without plugins)

You need to take a look at /core_root/wp-admin/includes/class-wp-terms-list-table.php and then add an extended class and make use of the WP_list_Table Class and documentation. basically you’re overriding the order and orderby in some custom plugin. Btw: “No Plugins” is never a good idea as plugins may show you how it works in code and therefore be … Read more

Integrating an interactive map into a WordPress custom post type

The easiest way would be to use a function which accepts a region taxonomy term as an argument, and outputs a list of posts with that term (i.e. ‘in that region’). So your template looks like: <!–nw–> <div id=”nw” class=”counties-container”> <h2>North West</h2> <p class=”nw-t”><?php my_posts_by_region(‘nw’); ?></p> </div> I’m assuming that ‘nw’ is the term name … Read more

How to assign default taxonomy to pages on ‘save_post’?

You are using wp_set_object_terms wrong, the second parameter should be the term slug or id and the 3 parameter should be the taxonomy name, so try: function set_default_object_terms( $id, $post ) { if ( ‘publish’ === $post->post_status ) { log_me (‘be in function while “publish” i pressed with this id: ‘.$id); $taxonomy_ar = get_terms( ‘property-features’ … Read more

Custom SQL Query on Custom Post Type. Order by Taxonomy?

Just looking at the term_taxonomy table, you are selecting everything correctly, but the last part: WHERE $wpdb->posts.post_type=”publications” AND $wpdb->terms.slug = %s AND $wpdb->term_taxonomy.taxonomy = ‘category’ ORDER BY $wpdb->term_taxonomy.taxonomy = ‘topics’ DESC from the post_type of publications, the terms slug of %s, and has the taxonomy of categories, but you are never selecting the taxonomy topics. … Read more