The “sort” query param is usually “orderby” not “sortby”, to match the SQL ORDER BY
clause.
Perhaps try:
$the_query = 'posts_per_page=-1&orderby=name&order=ASC&post_type=mycustom&custom_cat=mycat';
It’s also possible that the value you are passing is incorrect, but without knowing the details of your custom post type there’s not much else I can suggest.
Related Posts:
- Theme localization of “slugs” (custom post types, taxonomies)
- How do I set the default admin sort order for a custom post type to a custom column?
- Using meta_query, how can i filter by a custom field and order by another one?
- How do I get a post (page or CPT) ID from a title or slug?
- register_post_type sort order by title by default
- custom slug for custom post type
- Disable permalink on custom post type
- Using Custom Fields in Custom Post Type URL
- Custom Post Type, WP_Query and ‘orderby’
- Filter admin columns by custom post field value
- Custom Taxonomy Template Post List with Sort Order
- Dynamic taxonomy in permalink made all other posts NOT FOUND?
- Post slug changed using code doesn’t reflect on editor when post is published
- Taxonomy page returns 404 page not found
- Custom Post type sort order not working in the admin area
- Reslug a Custom Post Type
- Removing CPT slug from URL results in 404 error for archive page
- Custom Post Type pagination when CPT ‘rewrite’ rule and a page have the same slug
- Getting Post ID from slug during init
- Alphabetical sorting of custom post type – one letter per page
- sort events based on event date custom field
- How to Sort by Date When Using d-m-Y Format
- Custom post type’s slug gets wrong when adding a custom meta box
- Rewrite CPT slug with two taxonomy slug instead of one
- Can’t edit Custom Post Type slug/permalink
- How to add new tab to admin list of posts and handle result list
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- Custom-post-type-archive: posts sorted/filtered by year?
- Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure
- query_posts with a custom post type, a meta_query and sorting by post date?
- sort order for a custom post-type [closed]
- Custom post type with slug for plural (archive) and for single
- Rewrite rules for custom post type slug
- Automaticly add slug to posts
- Make slug as ID Number for custom post types
- Custom post type and taxonomy slug issue
- Custom post types archive redirect
- Does WordPress limit the length of slug names for Post Meta or Terms?
- Remove post type slug of all post types from permalinks
- Sorting custom post type columns with external data and without meta values
- CPT custom archive template does not get loaded
- Am I using the flush_rewrite_rules function in the right place?
- Rewrite post type slug only for child theme
- Child post with numeric only slug keeps redirecting to parent
- How to add a post slug to a url?
- Permalink for a custom post type isn’t working and I don’t know why
- WP_Query order by custom field, then randomly order some of results
- How can I make the slug of the taxonomy also the slug of the custom post
- Assign same parrent Page to pages AND custom post types
- Store CPT ‘Reviews’ average ratings to a WordPress DB table or to a DB custom table?
- Allow duplicate slugs for custom post type with taxonomies
- Custom post type, organized by categories
- Nested Custom Post Type or Custom Post Type Parents?
- Multiple (two) category postings on the same page.
- Sort entries by date mixing two post types
- Order a custom post type admin screen by a second custom post type title
- How to sort posts in a custom post type by title in ascending order by default?
- How do you create %post_type%/%postname%/ permalink structure?
- Slug for custom post type
- Custom post type sorting: alphabetical order
- Slug Confusion Between Post and Custom Post types?
- Sort a custom post with ACF: Date Picker & Display Featured!
- Different slug taxonomy for two different CPT
- Sortable column containing numeric values for Custom Post Type at WordPress Backend
- How to get postname in custom page?
- WordPress Custom Post Type – Rewrite Query
- Sort custom post type by most current date picker
- Changing CPT slug and taxonomy already registered in parent theme
- Custom Post Types and Removing Slugs – should we do it?
- Make a custom column sortable by a value from a different custom post type
- Need to return a string as permalink insted of str_replace
- Under What Conditions Can I name my CPT the same as my CPT Page?
- Custom post type and multi taxonomies + customize url
- Use custom post type taxonomy between cpt slug and name
- Show code dependant on CPT & category
- Remove custom taxonamy slug with pagination
- How to sort by multiple values in a nested WP_Query
- How to sort post category using its Description
- Using Orderby and meta_value to order natural/alphanumerical
- Custom Post Type duplicating slug for new posts
- WordPress page not showing up – replaced with last 10 posts?
- Custom permalink rewrite rules – how do I fix this?
- Display a Custom Post Type within another with hierarchically slug
- Generate slug and meta data if meta field is empty
- Custom post type taxonomy not sorting correctly
- Can’t make permalink of CPT work
- How do I sort post listing by child post count?
- Custom Post Type Rewrite Rule
- How can I retrieve the slug for a custom post type via name?
- WP Query WordPress Post Type with the same Taxonomy name
- sort custom post type by display name
- Ideal top-level slug methods
- Create page using same slug as custom post type
- Hide custom post type slug url from search engine [closed]
- Custom order of CPT posts by title, in wp-admin area by default
- Custom post type Premalinks main page and details page
- Is it possible to use a post name in a custom post slug?
- How to change permalink structure off default posts and also CPT’s posts
- Add post id to url instead of WordPress default -2 suffix
- Taxonomy Archive URL + Template