My code is as follows:
$custom_args = array( 'orderby' => 'name', 'order' => 'ASC', 'depth' => 1, 'number' => 4, ); wp_list_categories($custom_args);
I'd like to create a list of categories and to show only the parent category, I use
'depth' => 1, but because I also want to control the number of categories, I added
'number' => 4 hoping that would be enough however it only shows one parent category.
If I remove
depth it shows the 4 categories but the links are also children categories.
Any idea on how to solve this issue I'm having? Many thanks in advance.