as ChrisL said in the comments, you should add order and orderby to your arguments :
$args = array(
'post_type' => 'totem',
'posts_per_page' => -1,
'orderby' => 'title',
'order' => 'ASC'
);
Related Posts:
- Automatically adding meta data to posts or multiple query help
- Display post content with respect to its title?
- Query Custom Post Types with checkboxes
- Pagination not working with custom loop
- Get the ID of the latest post
- Order by & include array by specific post ids
- Get list of all registered post types slugs
- Sort custom post type list table by display name of a user id stored as post meta value
- How to use a custom post type as front page?
- Random post, once per day
- get attachments for all posts of particular post type
- Query custom post type by custom field
- Add Custom Post Type to Current Query
- Custom Queries: Joining On Meta Values From Two Custom Post Types
- Limit the post for differents custom post type in the same wp_query
- array_pop() expects array, boolean given for $event_type_term ->slug
- SQL to update custom post taxonomies
- Query multiple taxonomy in Custom Post Type
- Querying Posts by Taxonomy From Alternate Network Site
- Custom Search | Wrong output & question
- Get the most popular terms for a custom post type
- Query by 2 values of a repeater ACF field
- show posts only on homepage but using custom post type and taxonomy for query posts via url
- Comparing timestamps in meta query doesn’t work
- Display two post types ordered by two custom fields
- WP insert post PHP function dynamically generated Custom Fields
- Include both default and Custom Post Type in query modified inside pre_get_posts
- Query posts between two dates (custom meta keys) CMB2
- $wpdb returns no results with SELECT query on custom post type, works on default post type
- Include different loop templates in search query
- Adding posts of custom type into the main feed
- Save custom post type in different table
- Custom Post Types, Page Templates and Pagination. Why do I get a 404 Error?
- Inserting data into `post meta` table?
- Custom Select Query with Custom Post Types
- Having trouble with custom date field for CPT query (WordPress)
- Custom Post Type order by modified date and custom meta field issue
- Sort posts based on multiple custom fields
- WP_Query search posts by custom post type and custom taxonomy
- Calculating Bayesian average for custom post type
- Conditional to modify query results
- Is it possible to create a shortcode that will query a post based on taxonomies?
- Selecting New & Edit Page for Custom Post Types
- Show Two custom Post type and their posts on category page
- How to filter custom taxonomy categories on archive?
- Modifying date filter on admin page for custom post type to link to custom field
- Ignore sticky posts if post is not in meta query
- Querying Term Posts in Loop
- How to debug a blank page?
- query posts and custom post type with meta key
- Use get_post_types to query only custom posts types
- WordPress Orderby Numeric Value Not Working
- Create a post in custom post type using field in registration form after users submit form
- Query string parameters from custom fields, inconsistent results
- Custom Post type is being ignored in query
- Query custom post type only if it contains another custom post type
- My theme saves their custom post type’s metadata as a serialized array, how to access the keys?
- Save an array from drop-down in custom meta box
- Add post_type to index.php
- Order By Post Type ThenBy Taxonomy
- Custom query to filter posts that have current post as a taxonomy [closed]
- Am unable to reset a query properly
- Custom post type redirected to homepage – how to debug
- How to modify archive query with pre_get_posts to append CPTs?
- Get next and previous 3 posts in a term in single post page
- convert custom query to wp_query
- Making certain categories of CPT not publicly queryable
- Search / Filter posts on Title/Content OR Tags
- Get parse_query filter to return slug instead of id
- Querying both pages and posts
- How to store multiple values in 1 meta_key with radio input?
- Meta query for custom post type ignored in main query
- Querying Two Custom Post Types with OR Not Working
- How do I move/order posts with a tag to the end?
- Display a CPT based on a metabox selection
- creat filter with wp_query
- Specific query for custom post type
- Storing a many to many post type relationship in post meta and keeping SQL ability for Joins
- First custom field value (out of several) displayed twice after query
- Prioritize posts in query by meta keys?
- What’s the equivalent of Hide From Menus on MODX on WordPress?
- WP_Query orderby and tax_query
- Limit the post for differents custom post type in the same wp_query
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- Displaying Posts from Custom Post Types
- Different Ways to Query Custom Post Types?
- How to organise this data within WordPress
- Custom post type posts don’t show in archive widget
- Showing specific post in order of array wp_query
- Custom Post Types — $args vs. labels array
- Number of posts in the archive
- Query of custom post types only shows first post
- Custom query for custom post_type
- Adding custom field values to wp_list_pages
- Query multiple taxonomies with pre get posts
- How to query 2 custom post types that need to share a slug?
- Get an array wich contains the post_name of every post that has the custom post_type “pelicula”
- Add first letter of titles to array, then compare arrays
- WP_Query() with custom post type and taxonomy — get all terms?
- show all custom posts types in home page