Is your get_categories() function not working by showing any matches? You may need to allow the display of empty categories.
1 answers
1
Making get_categories() display all categories
Your get_categories() function will only be displaying results for categories in use as default.
In order to show all the categories, try to set hide_empty to false in your get_categories() function’s arguments, as per the below example.
foreach ( get_categories( array( 'hide_empty' => false ) ) as $category ) { //Do your output here }
— Support WizardAnswer 1