Display Child Categories of Current Post ID

For actual categories: <ul> <?php global $post; // grab categories of current post $categories = get_the_category($post->ID); // define arguments of following listing function $args = array ( ‘child_of’ => $categories[0], // current post’s (first) category ‘title_li’ => ” // disable display of outer list item ); // list child categories wp_list_categories($args); ?> </ul> The same … Read more

How to create subdomain for custom post type and associated custom taxonomies

While multisite would give you exactly what you wanted via domain mapping, you’ve opted to throw away this option in favour of the much more time consuming and harder method of manual htaccess rewrites etc. The challenges you face include: Telling wordpress to rewrite the permalink URLs it outputs to shop.mysite.com but not for the … Read more

Show 10 newest post for each value of a custom taxonomy

This code runs a foreach loop through each value associated with the language taxonomy then runs a query on that value to get the posts associated with it. $taxonomies = get_categories( array( ‘taxonomy’ => ‘language’ ) ); foreach ( $taxonomies as $tax ) { global $post; $args = array( ‘language’ => $tax->category_nicename, ‘posts_per_page’ => 10 … Read more