<?php
// functions.php in 2014 child theme 4/8/2023
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;
// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED - Do not modify or remove comment markers above or below:
if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
function chld_thm_cfg_parent_css() {
wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css' );
}
endif;
add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
// END ENQUEUE PARENT ACTION
function my_wp_nav_menu_args($args = '') {
// Logged in menu to display;Public = 10 Menu = 9 Admin = 11
// Public is for non-members Menu is for HFA members Admin is for Admin functions
if ( is_user_logged_in() ) {
if ( current_user_can( 'activate_plugins' ) ) {
$args['menu'] = 11; // admin only menu
} else {
$args['menu'] = 9;
}
} else {
// Non-logged-in menu to display
$args['menu'] = 10;
}
return $args;
}
add_filter('wp_nav_menu_args', 'my_wp_nav_menu_args');
Success. The code above successfully presents different menus based on user category: admin, group member, and public. The first try had $args[’menu’] = 11; I’m looking at the answer above, and see the line as $args[‘menu’] = 11;
Somewhere in copying the code from the Forum to notepad to FileZilla to theme file editor the bracket got changed to #091; syntax for the menu choices, and the php evidently choked on that. Will definitely research which version of php is being used, and watch out for substitutions in the future. Thank you for your help.