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
- Some doubts about how the main query and the custom query works in this custom theme?
- Using a custom WP_Query with get_template_part loop
- WP_Query orderby post__in remains ineffective in the Loop [closed]
- Loop within a loop?
- Display posts the match taxonomy term linked from wp_list_categoies?
- How to order a post type with meta_value_num and if meta_value_num does not exist then order by date
- Pagination Not working on Home Page with 2 Query
- Exclude post on loop by multiple meta key value
- Sort by meta key on archive page
- WP_Query order by date in meta_value
- Query sticky posts with thumbnails
- Why is this coming back as null? Thats wrong. There is one post
- Meta query with order by another custom field
- How to retrieve current page WP_Query arguments?
- How to limit WP_Query to one result on the loop?
- How do I sort posts with multiple pages
- Random loop with code to prevent duplicate output returns no output at all from time to time
- How to use offset in WP_Query
- List custom taxonomy terms sharing posts with a term from a second custom taxonomy
- SQL: What is wrong with the following query (generated by WordPress WP_Query, ordering prices)
- Order By table field comment_status in WordPress > 4.0
- Multiple loops without repeating content
- How to orderby multiple meta fields if some fields are empty
- Filtering posts from different categories into different section by doing WP_Query only once
- How to make search for posts using get method?
- How to get list of posts from permalinks?
- get_template_part causes 500 error
- how to use pre_gets_posts to exclude one queried ID from homepage loop
- WP_Query – Adding “offset” posts to the end of the loop
- Conditional operator OR not working with custom fields
- How to add custom meta to ‘pre_get_terms’?
- Get posts that do not have the same tags as current
- wp_query is showing posts from other categories
- Should I reset $wp_query?
- Exclude a Woocommerce product from WP_Query
- WP_QUERY wrong ammount of posts
- How to add sort order to incremented and paginated category loop
- Expecting statement error from php loop using ACF plugin
- How do I sort this custom list of sticky posts
- Query only displays one page_id
- wp-query, pull children of parent page
- Randomly select one of last 3 posts
- I am officially missing something about transient posts
- How do I get the content of a custom instance of WP_Query?
- how to retrieve WP_Query without ordering by date [duplicate]
- Ascending order has strange effects on wordpress loop
- WP_Query orderby
- Only show tag with the same id as the post
- How to sort store location by specific category order in WP store locations
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- ACF: How can I publish values of ACF fields in a loop while using wp_query?
- Order posts alphabetically with numbers but some of the posts has numbers in the title
- WP_Query random ordering not working since 5.4
- Show a message if there are no active posts in category
- SEARCH QUERIES – REVERSE OUTPUT
- Problem with my loops
- Paging works correctly on local version, but not live?
- Custom post type loop error: Trying to get property of non-object
- How to add in WP_Query to every 3 posts displayed? [duplicate]
- Show full category tree for a year with all post titles?
- How to make a wordpress loop file that displays posts based on certain conditions
- Find by post_meta, then sort by post_meta, then sort by date (wp_posts)
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- Issue in If else condition [closed]
- Pagination not working with WP_QUERY
- How do I display posts with specific value in a custom field into my loop?
- wp_query pagination links producing 404
- Pagination problem with multiple loops on the same page
- Can’t seem to get an else statement correct? [closed]
- Output ACF field dynamicaly within a taxonomy loop [closed]
- Woocommerce set loop_shop_columns to be 3 in the main shop page loop only and 4 otherwise