Theme modification for custom category menus
As indicated above, I discovered the answer to my own question. You do not need single quotes or brackets around the variable. The fact that the variable is a string itself is sufficient. The correct code is below: <?php $cat = get_the_category(); $catSlug = $cat[0]->slug; $catMenu = $catSlug . “-nav-menu”; $options = array( ‘container’=>’nav’, ‘container_class’=>’menu-header’, … Read more