Display or retrieve the HTML list of categories.

learn more… | top users | synonyms

0
votes
1answer
30 views

wp_list_categories with category description

It seems to me that category_description should be an option in wp_list_categories. Is there way to pull the description when listing all categories?
0
votes
1answer
25 views

Trying To Get Child Categories To Show, Issue With foreach Loop

I made 6 sub-categories, all children of my "Resources" category, and I'm trying get them to display on a page, but at the moment it's only displaying the first category (leading me to believe my ...
1
vote
1answer
813 views

Listing Specific Categories from Current Post with Depth

I've been on this for sometime and been having a ton of issues to find a proper way to do what I'm trying to achieve. An Example would be as follows: I have a featured Image with a rollover and I ...
-2
votes
1answer
26 views

Listing category and its posts one by one

I want to show all category and its posts as below in a page, for a dynamic website. Please help -category a -post a1 -post a2 -post a3 -category b -post b1 -post b2 -post b3
0
votes
1answer
488 views

Custom HTML structure in wp_list_categories

I am trying to accomplish an Ajax navigation for the categories and for that I need the code to look something like: <ul> <li data-level="1">Parent Category</li> <li data-...
8
votes
2answers
83 views

How To Create A Paginated List Of All Categories On My Site?

I want to display an archive page with pagination that lists all the categories on my site, and each link goes to that particular category archive page. So this would be like an archive page of ...
2
votes
0answers
36 views

Filtering a custom post type by custom taxonomy in archive template

I've seen this question posted in different forms before, but most of those solutions are centered around the admin interface, and I haven't found any answers that apply to the front end. I've got a ...
0
votes
1answer
18 views

How to toggle custom WP archive list

Help! I'm trying to toggle the "SideDish Archive" list in the right-hand sidebar of this page – http://my-table.com/sidedish/. I don't know really anything about javascript. Small company, small ...
1
vote
1answer
47 views

Using separator with wp_list_categories

How can I use separator with wp_list_categories using inline list? In documentation they say (string) Separator between links. Default '<br />'. Well I guess that means I could use HTML right? I ...
0
votes
0answers
24 views

show subcategories of each category easy digital download

I'm looking for a way to show the subcategories of each category. I have this code that displays all categories, but do not know how to display only subcategories of the category in which one is ...
0
votes
0answers
27 views

Show name of post category, and name of category parrent (if category has parent)

Example: I have category named "Food" and inside that category another category named "Fruit". How to show name of post category, and its parent category (it category has parent category). After ...
0
votes
2answers
2k views

Highlight current category in wp_list_categories

I am using wp_list_categories to display all terms of my custom taxonomy 'categories'. The function is outputting all my terms successfully but the current category is not being highlighted, even ...
0
votes
0answers
57 views

Post not show after select the category from drop down

I show all my categories in dropdown and want to show all the related post from specific category My code is here <li id="categories"> <h2><?php _e( 'Posts by Category' ); ?>&...
0
votes
2answers
76 views

Exclude categories from wp_list_categories by category slug

I'd like to exclude categories from wp_list_categories() but I want to use the category slug because I do development on a local install where the category ID will be different in production. I got ...
1
vote
1answer
31 views

Get categories with posts by custom field value

I have a big categories tree (~2000 total subcategories)... And I have a lot of posts with custom field "city" (different values). I have created filter posts by "city" field. But I have problem with ...
3
votes
1answer
148 views

How to list all categories and tags in a page?

Suppose we have few categories, tags and custom post type and taxonomies. How can we list all categories, tags in a page? Something like; Page Category Thumbnail and Category Name 1(link to ...
0
votes
1answer
5k views

Add class to items in wp_list_categories()

I have this in my category.php to show sub-subcategories: <?php if (is_category()) { $this_category = get_category($cat); if (get_category_children($this_category->cat_ID) != "") { echo ...
1
vote
0answers
23 views

Categories as main menu items and subcategories as nested lists

I am new to WordPress and am trying to make my website. Would it be possible to list categories and subcategories as a nested list with links in the main navigation menu. What am i trying to achieve ...
0
votes
1answer
68 views

wp_list_categories not excluing multiple ids

I recently updated to WP 4.4 and im using this code: $args = array( 'orderby' => 'ID', 'show_count' => 1, 'taxonomy' => 'portfolio-type', '...
0
votes
1answer
41 views

Difference between wp_list_categories and get_categories

Whats the difference between the wp_list_categories and get_categories? Wordpress codex says use get_categories if needs a function that does not format the results what format is this ...
0
votes
1answer
72 views

List posts of assigned categories in list of all categories on single.php

here's what I'm trying to accomplish: I've got several categories, each of them have several posts. Now, on category.php I'm able to output a list of all categories and, inside this list, show a list ...
0
votes
1answer
69 views

wp_list_categories() by alphabet? (ex. only category titles that start with “A”) [closed]

I have used this code function show_categories_fn(){ return wp_list_categories("echo=0&title_li"); } add_shortcode('show_categories', 'show_categories_fn'); I got the category list but I ...
1
vote
3answers
76 views

How do I remove the <br> tags from wp_list_categories?

If I pass in 'style' => 'none' as an argument to wp_list_categories, the <li> tags are removed. That's great, but <br> tags are injected. How can I remove them?
0
votes
1answer
140 views

get_terms() parent, child and grandchild

parent1 - child1 - grandchild1 I need to show child terms of any current term (only direct child) for each term I visit. Works only for the parent (show child1) but not for the child (doesn't show ...
-1
votes
2answers
1k views

wp_list_categories() not listing categories

I've many categories in my database but when i'm calling wp_list_categories() it is not listing any categories, its only outputting Categories No categories Also, I'm trying to populate it using ...
1
vote
1answer
780 views

How can i list current author's categories?

My Code getting authors written post categories but just 2 ID has author lists category.. I replace $current_user->ID but it is not worked. <?php $categories = $wpdb->get_results(" ...
0
votes
2answers
366 views

How to display wp_list_categories on div instead of li?

Does anyone know how to display the wp_list_categories() on a div instead of the li? I basically want to wrap main categories and its children in a bootstrap column. $args = array( 'taxonomy' ...
2
votes
1answer
148 views

Category Archive, list subcategories of each post

I found this post, but it was never answered. I'm looking for the same thing, haven't been able to find a solution so far. My problem is that I can't find a way to list subcategories unique to each ...
1
vote
2answers
33 views

shop page with all categories with paginate

I am very new in wordpress theme development. how can i make page template for my store page where my all categories listed with 6 to 10 latest post with that category and category name has a link to ...
1
vote
1answer
107 views

wp_list_categories depth and number

My code is as follows: $custom_args = array( 'orderby' => 'name', 'order' => 'ASC', 'depth' => 1, 'number' => 4, ); ...
0
votes
0answers
14 views

List categories alphabetically in multiple colums with subcategories

I have this code to list categories alphabetically in multiple colums <?php $cats = explode(" ",wp_list_categories('title_li=&echo=0&depth=0&style=list')); $cat_n = count($cats) - 1; ...
0
votes
0answers
25 views

how to get 1 post from current category's sub categories

I want to show a list of current category's subcategories with their latest past in subcategories I have categories like this >> Electronics >> Mobile >> Android ...
0
votes
0answers
30 views

Get list with all product categories 5 layers

I know this is a very bad example but i want to exmpain it simple My woocommerce product categories is like category1 -category11 --category111 ----category1111 -----category11111 -category12 -...
1
vote
0answers
55 views

wp_list_categories

I wonder if anyone could shed some light for me. I have updated wordpress and one of my plugins has stopped working, which is also up to date. I have narrowed it down to exactly what isnt working the ...
0
votes
0answers
21 views

Hierarchy of category and its child categories

I have something like this... I have Subjects-->Groups-->post1, post2, post3... Which means I always have posts in groups ... by using wp_list_cats('sort_column=name&depth=1'); I can get top ...
0
votes
0answers
45 views

List post categories with a custom taxonomy term assigned

I have one custom taxonomy called 'p_type' with 'news' as one of it's terms. All of my posts have one or more categories assigned and a part of them also has 'news' as a custom taxonomy term assigned. ...
0
votes
1answer
108 views

How to show posts only for the last subcategory?

I have a hierarchical categories tree, meaning up to 3-4 subcategories with posts. When clicking on a category link in the home page, I am redirected to the category page. I need to check if there ...
0
votes
1answer
2k views

Add filter to wp_dropdown_pages() or wp_dropdown_categories() - no select container?

I'm working with wp_dropdown_pages() and wp_dropdown_categories() and both are always outputting a <select>-box with its <option>s as items. Is it possible to add a filter/hook to this ...
0
votes
0answers
90 views

Post count is wrong in all categories on backend and frontend

Admin area is showing wrong post count for all the categories (and I have 300+) It's showing more posts than they actually are, even for new categories with no posts at all shows like 5 or more. I ...
0
votes
0answers
37 views

Displaying and adding categories on a plugin page, just like we do in a post editor

wp_category_checklist() is the solution to display categories with checklist and it is working fine for me now. But I would like to port all the things in the category meta box (not the metabox itself)...
-1
votes
2answers
234 views

How to display category list with category description

I have five categories for a custom post type, additionally I have installed a plugin to enable upload image to each category detail, actually I can get show list of categories with details. I need to ...
0
votes
0answers
161 views

Hide specific categories from category widget

I'm trying to hide a large amount of categories from my category widget. I've tried a few plugins but none of them seem to want to let me use the dropdown option. I looked into the ...
0
votes
1answer
151 views

wp_list_categories set order manually?

Is it possible to do this? In the codex the 'orderby' option does not allow manual ordering (only ascending ID, name, count, slug etc). Here is the code: <?php wp_list_categories('include=16,...
1
vote
1answer
133 views

Creating a category page by alphabet

i'm new to wordpress, and i don't know how to code. I would like to make a page where all my animes are sorted by alphabet, like in this image I've heard about the wp_list_category function, so i ...
3
votes
0answers
205 views

How to show subcategories in categories else show posts

I have hierarchy like this: Category1 -Subcategory1 -Subcategory2 --Post1 Category2 -Subcategory1 I need to show subcategories name and description when i go to category//// Now i use this code: ...
0
votes
1answer
142 views

wp_list_categories + widget

With the code below, I added a span tag + placed the category count inside the link. add_filter('wp_list_categories', 'cat_count_span'); function cat_count_span($links) { $links = ...
0
votes
0answers
56 views

Problem with wp_list_categories

I use wp_list_categories('echo=true&show_count=1'). Everything works well but there is one thing is that. Show category contains 1 post, but it results count is zero, I click on that category link,...
0
votes
2answers
111 views

Latest updated categories list query, exclude one from displaying

I have this query: $cat_array = array(); $args=array( 'post_type' => 'post', 'post_status' => 'publish', 'exclude' => '187', 'posts_per_page' => 19, '...
1
vote
1answer
230 views

wp_list_categories() - adding a div to each li?

I am using wp_list_categories() to print out a link to each category from a specific author ID which is working fine. However, I would also like to add a div to each li which will hold an icon for the ...
0
votes
1answer
448 views

Display post list within category list sorted by name [duplicate]

I'm trying to display a list of categories sorted by name and all posts of each category inside it. Like this: Category A Post B Post F Post Z Category B Post A Post C Post G Category C Post D ...