Display or retrieve the HTML list of categories.

learn more… | top users | synonyms

0
votes
1answer
776 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 ...
0
votes
1answer
4k 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
12 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
38 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', ...
2
votes
1answer
115 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
26 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
46 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
63 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
62 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
74 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
684 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
176 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
86 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
31 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 ...
0
votes
1answer
70 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
8 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
22 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
25 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
46 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
41 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
57 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
72 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
31 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 ...
-1
votes
2answers
160 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
89 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
93 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 ...
0
votes
0answers
72 views

Exclude Parent Category and it's sub-categories from menu list

I search about this question before post here in some forum and here too but there isn't a perfect solution yet, My question is how tow "Exclude Parent Category and it's sub-categories from menu ...
1
vote
1answer
101 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 ...
2
votes
0answers
159 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
109 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
34 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 ...
0
votes
2answers
94 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
176 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
309 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 ...
0
votes
1answer
206 views

Multiple Dropdown's with Submit Button

I am pulling 2 categories into 2 dropdown lists. When I click submit the URL is showing the filtering but its just loading the homepage. I want the user to be able to select multiple categories and ...
0
votes
2answers
221 views

list all categories that have a certain word in title

How to list all the categories that have a certain word in title - first word of the category? in category.php so, for example, if I am viewing the category "Green Apples Sells", it will list all the ...
0
votes
0answers
32 views

Display custom Taxonomies same as listing Categories

I have used CPT UI plugin to create a custom post type and a custom taxonomy to go with it. In a manner as similar to wp_list_categories() as possible, I'd like to list these new custom taxonomies as ...
0
votes
0answers
96 views

wp_list_categories doesn't return 4th level of children

On my website, I have a taxonomy, on each term page of which I list child terms. If there are children, immediate ones (depth=1) are displayed. If there are none of them, nothing is displayed. The ...
0
votes
1answer
81 views

Get images by category

My current way of getting the images for sliders is by using the following code that works perfectly: $args = array( 'post_type' => 'attachment', 'sort_order' => 'ASC', ...
0
votes
1answer
403 views

Category Page Custom Layout [closed]

I'm beginner in wordpress. I want to modify category page layout from this : into this : I'm using The7 theme. I have read this Category Templates, but still don't know how to. I have create ...
2
votes
1answer
460 views

Changing post category from dropdown

I am showing a list of posts on the front of my wordpress site which each have a dropdown next to them with a list of category's, which are pulled in as follows. As you can see the form submit button ...
0
votes
0answers
120 views

How To Get WordPress Categories Last Update Date?

I am trying to make a custom sitemap for my WordPress blogs categories. For that I added the below code in my functions.php file and save it. Now all things is working fine but I want to get the date ...
0
votes
1answer
2k views

Category Template for Custom Post Type

I'm driving myself crazy with the following issue, hope you can help me! I'm working on a WordPress theme for a business directory so I decided to make some custom posts types on functions.php file ...
0
votes
1answer
353 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 ...
0
votes
1answer
261 views

Add Thumbnail to wp_list_categories()

I'm using the following code to display a list of my taxonomy terms in my home page: $customPostTaxonomies = get_object_taxonomies( 'guide' ); if( count( $customPostTaxonomies ) > 0 ) { ...
0
votes
1answer
330 views

Category with description and thumbnail

I am using the below codes to show all Parent Terms from a custom taxonomy with title and link on a page. But I want to show the parent term description, thumbnail and post count in it too. So how I ...
0
votes
0answers
43 views

wp_list_category only showing to logged in uers

I am trying to print categories at front end using <?php $args = array( 'show_option_all' => '', 'orderby' => 'name', 'order' => 'ASC', 'style' ...