Have a look at the orderby parameters for WP_Query to see all of the valid values that can be.
If wpcf-start-time is a meta key, then orderby should be meta_value, which will also require you set a meta_key argument to tell WP what meta key you want to order on-
} elseif ($q->is_post_type_archive('cif-events')) {
$q->set('orderby', 'meta_value');
$q->set('meta_key', 'wpcf-start-time');
$q->set('order', 'ASC');
$q->set('posts_per_page', 300);
}
Related Posts:
- Adding ‘menu order’ column to custom post type admin screen
- Custom post type – order field
- Custom Post Type Archives by Year & Month?
- Get custom post type slug for an archive page
- Custom post type pagination 404 fix?
- Adding content to archive and taxonomy pages on custom post types?
- Filtering a custom post type by custom taxonomy in archive template
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- get term archive url / link
- How to get the custom post type from an archive page?
- Displaying a custom post type alphabetically
- How to remove “Archive:” label from archive title
- Order by & include array by specific post ids
- Why are posts from custom post type not displayed in “category” archive?
- Custom Post Type Archives by Date and Taxonomy
- Displaying category archive of custom post types
- Custom post types – Use post_id in permalink structure when using has_archive => true
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- $query->set in pre_get_posts is unintentionally affecting the backend
- Sort Order for a Custom Query in a Post Type Archive Not Working
- Pagination throws 404 error on custom taxonomy archive pages
- Select All in Parent Category, Group by Child Category?
- Setting up custom post type archives in WP3.1? Any luck?
- Proper way of making custom post type landing page or archive page
- How do I display two separate taxonomy archives for two post types that share a single taxonomy?
- Custom Post Type Archives by Date with Custom Permalink
- Filter for “get_post_type_archive_link()”
- How to add meta box to backend menu page
- Custom Post Type Archive Page: Set Posts Per Page, Paginate
- Ordering posts having multiple post-meta date fields
- Change title in head on Archive page
- Display Editable Text Above CPT Archive Listings
- Custom Post Type Archives with 0 Posts Redirects as 404
- How to show more posts on an archive page?
- Archive page with multiple taxonomies rewrite
- Multiple Paginations on one Page
- Create permalink structure for one taxonomy archive per custom post type
- Archive page…limiting posts per page
- WP 3.1 – archive pages for custom content types possible now without a plugin?
- Page is defaulting to archive page and not designated template
- Date archives for custom post type
- Custom Post Type Archive URL takes over page URL
- Order Posts by Taxonomy and Meta Value
- Custom comment status possible?
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- Display all custom post types in archives.php
- Custom Post type sort order not working in the admin area
- How to Add Pages Under Custom Post Type URL Structure?
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- WordPress custom post type category pagination 404 Error
- Order posts by (hierarchical custom) taxonomy terms and term children
- Custom Permalinks for Custom post Type Archives?
- is_singular won’t call my functions?
- Compare 3 custom fields and sort by oldest
- Show Custom Post Type by Author
- List upcoming events, ordered by date in a custom field
- Custom post type archive with pagination?
- Custom post type tag archives don’t work for basic loop?
- Removing CPT slug from URL results in 404 error for archive page
- Multiple post types in archives (filter?)
- Pages, Custom Posts & Custom Taxonomy defining slug structure
- How to show a tag archive of one post type only
- How to let custom post type posts show in standard post archive (like in homepage)?
- Regex problem in an add_rewrite_rule
- paginate function in archive for custom-post-type
- Custom taxonomy archive page not working
- Include Custom Posts Type in Year/Month/Date Archive
- Change plugin’s has_archive = true to false?
- where can I see my custom post type archive template?
- ascending order custom post type
- Custom post types not using archive structure
- How to turn custom-post archive into an overview page, listing the metadata of the posts?
- Allow admin to determine the order of queries?
- Posts 2 Posts: query connected — orderby problem
- Order custom post type is beign ignored
- Pagination not working for archive
- how to pass args for archive.php query?
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Remove plugin’s custom post type archive page and single pages [closed]
- How to order different custom post type in category or tag template page?
- WP_query orderby not working after WP4.0 update [closed]
- Query order by meta value force specific tag first
- Order Wp Query by earliest of 3 dates meta query
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
- Show custom category archive as front page and remove taxonomy slug from urls
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- Custom Post Type posts not getting picked up in archive widgets
- Remove date rewrite rule for custom post type archive page
- Why using archive pages at all?
- Taxonomy term archive claims there are no posts, but there are. How to resolve?
- A theme has 3 default types posts, services and portfolio in its posts grid.I want to add my custom post type products How can I achieve that?
- Separate archive template to show posts and CPT by same category/taxonomy
- Create an archive page by combining two post type
- author archives, showing all custom post types, problem on pagination
- How do I get an intermediary page between 2 custom post types?
- Query multiple post types – Order by type and post title title
- WordPress Custom Post Type Archive, filter by category and get pagination working
- Admin custom post ordering
- Custom Taxonomy archive with url parameters