New answers tagged wp-list-categories
Please add two new argument into your $args array. 1) Style with none value. See the markup section for more. 2) echo with 0(False). Now call and store the result into $categories variable and print it via printf(). Final code like: $args = array( 'taxonomy' => 'product_category', 'hide_empty' => 0, 'orderby' ...
You can specify the style argument as something other than the default (which is list) and it won't wrap the output in a <li>. You can then wrap it in a <div> yourself. Combine it with the echo argument if you need to check that the list isn't empty. Example: $args = array( 'taxonomy' => 'product_category', 'hide_empty' ...
while I was posting the question I saw this link How to only show posts on last child category and it helped me solve the last piece of the puzzle . now it can be done:)))
Top 50 recent answers are included