I had the same struggle like you, thank i sat down and rethought the whole thing, what you actually need to is select all the categories, and pass the category id to it.
Since you use a dlm_download you will need to do the following, get the terms from the dlm_download_category
$cats = get_terms('dlm_download_category');
Loop trough the category and pass query_posts in it
so
foreach ($cats as $cat)
{
$args = array(
'post_type' => 'dlm_download',
'dlm_download_category' => $cat->slug,
);
query_posts($args);
if (have_posts()) :
while (have_posts()) : the_post();
// your stuff here
endwhile;
endif;
}
And there you go
PS: if you want to make it with posts not with custom post
Than $cats = get_categories();
and pass 'cat' in to the argument.
Hope its clear and helps. Cheers
Related Posts:
- Order get_terms() By Custom Field
- How to Change the Categories Order in the Admin Dashboard?
- Sort posts by tags in category pages
- Display all posts in category, with specific tag posts at top
- I want to order categories based upon the latest post time
- WordPress Ordering Problem. How to fix ordering 1-10-100 issue?
- Custom order categories in admin dashboard
- Arrange posts by date in front page
- How to redefine the sorting of product categories by menu_order?
- Order categories by name or view count
- WooCommerce – How to show specific category first-rest of products-specific category last
- Custom taxonomy/category order
- I want to display the all the posts that are inside a certain subcategory
- wp e-commerce group product by category [closed]
- List posts in alphabetical order
- Custom loop of a single category, cannot order by date. What am I missing?
- How to change the order of the subcategory and category in a post?
- How do order product categories – on a parent category page – in Woocommerce?
- Natural sort / ordering wp_dropdown_categories
- Sort posts alphabetically by category/custom taxonomy, insert divider between different types
- How can I order all subcategories alphabetical independent of the parent categories?
- Ordering terms whilst in loop
- Modifying category order
- Configure query with multiple categories in a custom order?
- $args Orderby The number
- Woocommerce custom taxonomy order
- Woocommerce – Display product category of product in Orders page
- Post list category plugin alphabetical order [closed]
- Completely disable categories
- get_field not displaying my custom field value
- Show div only if post is in specific category
- wp_list_categories exclude not working
- Assigning a category to a user role
- what is the action hook code to supporting product category condition in single product page of woocommerce?
- Posts from multiblt categories but featured image only in the first one, the rest to have the post title only
- Hide uncategorized products from the shop page
- wp_list_categories() – adding a div to each li?
- Listing Parent, Child and GrandChild Categories and then the PostTitles on Page Template !
- Help with multiple dropdown tags search
- weekly archive for custom category
- ?cat=-1 Indexed Versions Of Homepage
- .htaccess too many redirects based on category slug
- How get permalink for the current category or tag?
- using checked function to verify value against an array
- wp_list_categories depth and number
- Order categories by most posts
- Exclude category from fucntion
- Custom archive.php: retrieve right post categories?
- Add category only if post has custom taxonomy category
- Restrict author to create subcategory in a selected category
- Display list of categories filtered by date?
- Redirect single article permalink to paginated category page
- Exclude category by slug in pre_get_posts?
- add slug beside name in Admin Category Checklists
- How to show 5 posts from specific category on related page?
- List only categories i specify
- Author Page – List of categories plus number of posts in that category
- Exclude category from related post
- Post belonging to many categories
- How can you access category information from a theme?
- Filter WooCommerce archive pages by an additional category
- WP 4.7 in_category change?
- How Do I Delete WordPress Posts Older Than 400 Days, From A WordPress Category
- Category Page Template – Can’t get category ID
- Filter Category Loop Dynamically
- Shortcode to display all the post from a category in a page
- WP Category Meta plugin fix? [closed]
- WP SQL Categories Export and Import
- How to display WooCommerce category image in my category page banner as a background?
- Why are my newly added categories not showing up when creating a post?
- Order wp_dropdown_categories by ASC or DESC
- add woocommerce archive description if exist
- Can’t display posts by filtering categories using isotope.js
- Get a list of categories, separated by / to display inside the for custom metatags
- Is there a reason to put a product in both the Child and Parent Categories?
- Get_term_meta() always returns false
- Get only children category name
- Displaying only selected categories
- No results found for second level category
- get_the_category vs wp_get_post_categories
- How to get get_categories()’s ‘hide_empty’ argument to work with global year var in the archive template?
- Getting a sub category based on a category name
- How to display only sticky posts on category pages?
- I have many different products on my website how can I get them to display under specific categories?
- Help with SQL query, how to add taxonomie terms with value stored in options?
- Categories in media library
- WordPress Shop and restricting products and categories for some users/groups
- Pass list of categories to JS
- WP url to get rss with full text of post
- Display Referring Category on single post?
- Paginating a list of all posts collected by category titles
- Display deepest post category, when post have multiple categories
- Paginate WordPress Category Pages
- Get a list of post titles and links from yootheme master theme
- Customize category query in widget
- Page permalink rewrite
- Broken category styling
- Woocommerce Force the category choice before creating new product? [duplicate]
- Custom EndPoint not working when strip child category in URL
- select posts from sql except posts from specific category