You should modify this fragment:
// Define the query
$args = array(
'post_type' => 'fiction',
'booktype' => $term->slug,
'orderby' => 'name',
'order' => 'ASC'
);
Related Posts:
- Show posts without term
- How to get order of posts?
- Order posts by ID in the given order
- How to order posts tag by tag?
- List taxonomy terms plus their latest post ordered by post date
- Show all parents and children in custom post type in right order
- Change default ordering of taxonomy terms – pre_get_terms
- WP_Query Order by Specific Post ID First
- Order by empty custom field
- Two loops on archive page
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- WP Query – order posts by meta field first and then order the rest
- How to Order a list of taxonomies? orderby?
- Check if a post has term inside loop
- Filtering by multiple conditions in the loop
- WP_Query orderby random do not repeat infinite scroll – one loop
- Creating ‘posts page’ loop based on the page itself
- How can I do a orderby by the number of items? So basically list by starting with the array with the largest number of post
- get_children() Archive Template
- How can I order a post query’s results based on the number of matching taxonomy terms?
- display ACF repater field in archive page
- How do I stop the same post showing multiple times in a archive?
- Get categories within specific term
- How to order posts, that have already been filtered by custom taxonomy, by their category names?
- Display three sequential posts on each page load, without repeating previous
- Order by multiple meta keys on wordpress
- Main loop querying current template’s info only in custom category archive pages, not my posts
- query only direct child and sub-terms of a current term archive
- the_excerpt() not working in custom archive
- Need help with Query Loop. Need to get current taxonomy term and its posts and group them by a different selected taxonomy term
- Loop increase in while loop not working
- Create a loop on my pages with new “WP_Query”
- Get posts that do not have the same tags as current
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- posts archive page – closing WP_Query loop correctly [closed]
- get term id from term name
- Order is breaking wp_query
- WP_Query to output chosen term and posts with no term assigned
- Create a page template for “top rated posts” but show full content and not just a list
- has_excerpt() not working inside wp_query
- wp_query is showing posts from other categories
- WP Job Manager plugin – Listing only the twelve job categories on frontpage order by jobs they have
- Daily drip of posts – based on user ‘startData’ – ordered oldest to newest
- How to add tax_query to $args with concatenation
- Should I reset $wp_query?
- Meta query compare for ID’s greater than specific ID
- Exclude a Woocommerce product from WP_Query
- WP ForLoop to compare meta information of posts to determine what post to display
- Filtering posts by archive showing all years
- AJAX Breaking Offset Argument In WP Query
- WP_QUERY wrong ammount of posts
- Getting the post terms ‘wp_get_post_terms’ per post when within the functions.php file
- How to add sort order to incremented and paginated category loop
- How does WP generate the default $query in WP_Query based on the URL?
- Continue or break the while loop
- How to filter query loop block with a search string from the query parameters
- How to print term name inside wp post loop
- inserting content of 1 Post to in another with a template hierarchy
- how to get category`s slug in WP_Query loop?
- Loop posts based on permalink term
- Save (and exclude) posts from loop to use in another loop on page
- Using WP_Query for categories instead of get_terms
- Get all posts with empty meta_value
- How to split a post and intercalate elements from a loop
- How to remove only the latest sticky post from the loop
- Expecting statement error from php loop using ACF plugin
- Loop 3 posts column wise and continue the loop into same columns
- How I can repeat 2 HTML templates in a WordPress Query?
- PHP – Loop custom post type categories within jQuery Tabs
- Grabbing taxonomy terms and inserting them into an array
- How to create a widget like this?
- How do I sort this custom list of sticky posts
- WP_Query with one category in args shows other categories
- Query only displays one page_id
- WP_Query with multiple orderby NOT working with ASC and DESC, what’s wrong?
- How to Order By Two Custom Fields?
- How order posts from category by date and comment count?
- Display specific page (that is child) content on parent page
- Different Loop for tag pages?
- Child pages not affected by orderby
- Ordering posts by custom field and grouped by month
- Pagination for custom loop on custom page template is not displaying anything
- Does putting queries within loops cause an issue on WordPress?
- Creating attachments archive in tags and categories
- WP_User_Query orderby meta_val_num
- Hiding carousel indicators if there’s only one post
- Query Taxonomy By Page Title
- WP_Query custom order and pagination
- More efficient way to list posts by category [duplicate]
- How to access $wp_query object from array of posts given by get_posts?
- Function using get_posts() with tax_query not working when called from functions.php
- Display all attached image of every post of custom post type and link to original post
- 2 queries with counters
- Get posts with no tags?
- Orderby two meta fields not working
- Post archive for certain post format
- wp-query, pull children of parent page
- Sorting posts by Multiple custom fields in defined order
- relation OR instead of AND – Filtered term ID’s in loop
- Writing less unnecessary code with WordPress