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:
- Get custom post type slug for an archive page
- Custom post type pagination 404 fix?
- Displaying a custom post type alphabetically
- How to remove “Archive:” label from archive title
- Why are posts from custom post type not displayed in “category” archive?
- Custom Post Type Archives by Date with Custom Permalink
- Display Editable Text Above CPT Archive Listings
- How to show a tag archive of one post type only
- paginate function in archive for custom-post-type
- Change plugin’s has_archive = true to false?
- How to create archive page for taxonomy terms within custom post type
- Category and post tag archives do not include posts from custom post type
- Slug for standard post post_type
- Display custom post types with custom date field value (before today) & order by custom date field
- WordPress custom post type archive with description
- Get post type from taxonomy or category page
- How to list custom post types?
- custom taxonomy archive by year
- Display CPT description on archive.php pages for all CPT
- When ‘is_post_type_archive()’ return true?
- How do I make a custom taxonomy for a CPT appear inbetween title and editor boxes?
- Combining sorted and random CPT
- CPT Archive with core Category
- I did group my search results by post type, but how can i give each of them its own order?
- Ordering posts in Search & taxonomy by post_meta
- Custom Post Type Archive Page Filtering
- Tag Archive for Custom-Post-Type Posts yielding 404 when permalinks set to postname
- URL of a custom post type’s post format archive?
- Create template for taxonomy results limited by Custom Post Type
- WordPress showing archive.php instead page
- How to order and group custom post type posts by year and month
- Custom post type / taxonomy rewrite archive page 2 gives 404
- Is it better to use filter for the_content in archive pages?
- Custom post type posts don’t show in archive widget
- Archive for a Taxonomy of a Custom Post type
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- Custom post type sorting: alphabetical order
- How can I use archive-{post_type}.php theme template?
- Taxonomy archive 404ing (not term archive)
- Return the name of the post type
- $wpdb->get_col and ORDER BY?
- Set a hard-coded page-template (post-type-archive) as home/front-page of my wordpress blog?
- archive as a page, so that it can be added in the wp_menu_nav
- Archive links for custom post types
- Show All Custom Post Types On A Single Archive Page
- WP_Query not resetting after wp_reset_postdata
- Custom Post Type setup
- Dynamic category name in query post
- Post ordering not working with custom field
- Custom Post Type Archive Pagination
- How to know which archive page is active
- Need to have an archive widget which organizes and displays a custom post type using a custom date field
- Archive Template being used instead of Category Template for Custom Post Type
- pre_get_posts works in post type archive but not in single post
- Menu’s breaking, now showing all page links on site
- How to have multiple archive pages?
- Changing WordPress sort order for returned child pages
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- How can I increase the post count for custom post types only?
- Listing authors and date archive from custom post type
- WordPress sitemap with Custom Post Types
- Is possible register two archive pages for single custom post type?
- users post count
- Display Parent-Child Posts in specific order by comparing IDs in array
- Custom Post Type Archive Page showing as 404
- Order posts alphabetically with numbers but some of the posts has numbers in the title
- How to order taxonomy terms by most recent post?
- Orderby if between two meta fields
- Display custom posts, ordered by most commented, without duplicates
- SEARCH QUERIES – REVERSE OUTPUT
- Custom Post Type archive page listing a 404 or single post
- How to order multiple custom post types with same taxonomy by date
- Using Orderby and meta_value to order natural/alphanumerical
- Custom post type pagination problem – page 1 and 2 show same content
- Adding Custom Post Types to category/tag/author archives breaks header content
- The page or ad listing you are trying to reach no longer exists or has expired
- One of my headings is mysteriously coming up as a link in my CPT Archive
- I broke it! Custom post type archive gets redirected to home
- What’s the most efficient way to get two queries based on an if statement?
- Want to display my custom date archive to date.php but dont know how
- WP Query with multiple post types ordered by custom meta date then published date
- Custom nav menu current item custom link problem
- Custom post order when using OR relation
- Stop Custom post type from being searched via URL
- archive-{custom_post_type}.php not getting recognized wordpress
- show previous/next post orderer by title in custom post types
- Custom Post Types Archives and daily/monthly joke
- ‘Blog Archive’ suddenly appeared on custom post type; how to remove
- Display results from two Custom Post Types in page template
- How to make a list of posts displaying them 5 by 5 with a “next posts” link?
- Stop header code from showing in category page?
- Query Custom Post Type and sort by year
- Custom post types not using archive structure
- Pagination not working for archive
- WP_query orderby not working after WP4.0 update [closed]
- Query order by meta value force specific tag first
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- 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?