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]
- Gutenberg editor add a custom category as wrapper for custom blocks
- Rewrite rule page url with category
- WP_Query not looking at child category
- Deleting default category in wordpress
- Excluding posts from a category but only if they’re not in multiple categories
- Most recent post from every category/taxonomy but sorted by date
- Category Archive, list subcategories of each post
- How do I remove the tags from wp_list_categories?
- How to group the loop posts in a particular by author?
- How to display get_the_category of post showing only CHILD of category “X”
- Get ID of current taxonomy in register_rest_field
- Custom page for WooCommerce’s /product-category/
- Add Class While on Current Post; wp_list_categories
- get all sub categories without specify any category
- How to use wp_category_checklist()?
- Get the name an the description of a link category
- Display child categories in WooCommerce
- WooCommerce duplicate sub categories and product slugs
- Check child/parent categories if exists
- How to run select query of post with category and tags for API?
- WordPress Genesis not excluding category from blog
- How to show only one category in breadcrumb navigation
- Trying to only display 1 category using get_posts
- How to display singular form of category name?
- Populate dropdown based on selection of parent category
- Categories for each brands
- Custom User-Created RSS Feed
- Permalinks: display just one kind of wp category in the posts url
- get_post_meta not working on category.php
- How can I improve this taxonomy treating approach?
- How to show more than 5 posts of the category?
- Dropdown Categories used in form shows no results when all is selected
- Nicer URL for viewing category of posts?
- Odd results in get_the_terms vs wp_get_post_terms
- Redirect Changed Permalink on wordpress
- Grandchild Term Things Grandfather Term is It’s Parent
- get full category structure by post id
- How order posts from category by date and comment count?
- Using categories with pages
- Show next post in same category but start from the latest
- Search form options group categories
- Can I define multiple paginations on a single page?
- Echo Category Nicename
- Explode() expects a string
- How to add meta description, keywords, custom title to a category template
- User level categories
- Exclude category from drop down list form
- How to exit out of delete_categories and stop action?
- Programmatically Create Category and sub Category and sub sub Category
- How to get the_category(‘, ‘) with link “title” attribute
- How to test if the post is in a primary category
- How to get the term id inside the start lvl method of category walker?
- Most efficient way to display current post subcategories?
- How to Query the Top 5 Posts of a specific category?
- How to add a post with new Taxonomy without assigning to default category?
- Using wp_list_pages to create 2 lists of pages and include and exclude some of them depending on their category
- How to create default categories in new installs?
- Check if value is a custom taxonomy category name
- Tracking multiple tags or categories
- 2 loops in archive.php (one for each category)
- How to load jquery tag-it plugin into admin?
- not empty categories don’t show in menu [closed]
- How do I add and display a custom image field to a category? [duplicate]
- Show parent-child relationship for categories in the wordpress admin
- How to assign different categories to pages in wordpress?
- Add category image before post title on homepage
- How to get specific number of category post on a page or category page?
- Use same wordpress category base and tags as the prefix as the post permalink
- Display different sidebar based on search results from one category
- Adding category to existing post (uploaded file)
- how to create a page that shows all of multiple category posts on a single page
- Quick Edit on taxonomy names results in error