Use the pre_get_posts
action to modify the query before it is run. Place this in your theme’s functions.php
:
function wpd_tax_alpha( $query ) {
if ( $query->is_tax('link-category') && $query->is_main_query() ) {
$query->set( 'orderby', 'title' );
$query->set( 'order', 'ASC' );
}
}
add_action( 'pre_get_posts', 'wpd_tax_alpha' );
Related Posts:
- Exclude a category from WP_Query
- Show Post Count of a Category
- Querying Term Posts in Loop
- Custom-Posttype & Custom Taxonomy WP_Query
- WP the_posts() on single-cars.php get category link
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
- WP Query filtering by custom category not showing all relevant posts
- How to create new category for custom post type?
- Custom Post Type Loop within Shortcode
- Fetch taxonomies by custom post type id array
- Weird problem happening with custom taxonmy when creating/updating posts
- Group custom posts by custom taxonomy names
- How can i skip same post from taxonomy term?
- Filter by custom taxonomy slug on a custom post type
- Pagination on category page with custom post types
- Insert HTML inside link in a walker
- Custom Post Types and independent Categories – complex Taxonomy
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Should I use custom taxonomy or custom post type
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Set menu active state for custom posttype and category, given custom taxonomy term
- How to show CPTs in term archive
- Display CPT posts based on specific taxonomy
- shortcode to show custom post types by category
- Display all posts in main category and 1 subcategory
- showing custom post types of a certain category only
- Query/list all terms and their custom post count
- Linking to the most recent post in a Custom Post Type
- Custom Post Type Archive Page Filtering
- How can I auto-assign a CPT post to category in a custom taxonomy when published?
- Filtering WP_Query Dynamically on the Front-End
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Genesis filterable portfolio isotope [closed]
- Posts from all the categories are being displayed instead of particular category
- wp_query check if integer exists in custom field’s array
- Wrong request query on cpt and tax
- Conditional Statement custom post type category
- Show custom post type filtered by category
- Custom Post Type With Categories
- Get custom taxonomies from multiple posts
- Pagination for Custom Taxonomy Page [duplicate]
- Search / Filter posts on Title/Content OR Tags
- Categories sorting
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- Allow user to set custom order to a list of custom taxonomies?
- get_category_parents for custom post type taxonomy
- Custom loop with multiple taxonomy queries
- Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?
- forming WP_Query for posts of all post types but from specific categories
- wp_list_categories() – current-cat class also inside posts?
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- Show a Category X’s custom post type on Category X archive page?
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- Custom taxonomy rewrite give pagination 404
- Hide parent categories when clicked, and show it’s childs
- WP_Query inside foreach loop returning same value for all options when filtered using ajax
- Limit amount of posts made within a custom taxonomy
- Filter CPT posts by one or more categories
- Getting categories of posts under a custom taxonomy
- Can’t remove front from permalinks for custom taxonomy category page
- Custom WP Query on custom meta and sort by multiple meta keys value
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- How can I made custom taxonomies relationship?
- What’s the WP way to load remaining custom posts?
- Custom taxonomies relationship
- WP Query with categories only shows one post and ignores the category
- How to edit this code to get the categories in achieve page?
- How to have this permalink structure: post_type/postname/custom_inner_page
- Query Custom Post Type Taxonomy term with multiple parameters
- Hierarchy and access control for Custom Post Types (CPT)
- Why is my category template ignoring post type?
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- First custom field value (out of several) displayed twice after query
- How to get custom posts sub category link
- Add Custom Post Type of specific Custom Taxonomy to regularly blog loop
- WP_Query orderby and tax_query
- browse by category and tags?
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- List of Posts and Categories
- Advanced search form with filters for custom taxonomies
- How do you create a custom template to display a category with an image and related posts below?
- Why is my WP_Query outputting my entries twice?
- How to display Related Posts based on number of taxonomy terms matched
- Custom Post Type Category Link
- Retrieve custom post types by custom taxonomies with WP_Query
- Custom Post type category pages template and loop
- tax_query not working in template
- Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()
- How to make WP_Query not to show irrelevant posts?
- in_category for custom post types
- Get parent category id from child category page for custom taxonomy
- WordPress wp_query() basic question about args
- Create an archive page for custom post type with custom taxonomy
- WP_Query Custom Post Type if Category ID Equals
- Custom post types and ‘new WP_Query’
- How to add current custom taxonomy slug to body class
- Using page slug in wp_query
- WP_Query() with custom post type and taxonomy — get all terms?