Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
What’s in your functions.php file of your Child Theme?
Additions for 4 features:
1. Favicon
2. Additional menus
3. Custom CSS for login page
4. Remove admin bar for users except admin
(code below)
I tried removing each item to see if that affected the issue. An empty functions.php file still causes the problem.
<!– CMZ add favicon –>
<?php
function add_theme_favicon() {
echo ‘<link rel=”shortcut icon” href=”‘ . get_bloginfo(‘stylesheet_directory’) . ‘/images/favicon.ico” >’;
}
add_action(‘wp_head’, ‘add_theme_favicon’);
?>
<!– CMZ add extra menus –>
<?php
register_nav_menu( ‘primary’, __( ‘Navigation Menu’, ‘twentythirteen’ ) );
register_nav_menu( ‘secondary’, __( ‘Bottom Menu’, ‘twentythirteen’ ) );
register_nav_menu( ‘tertiary’, __( ‘Footer Menu’, ‘twentythirteen’ ) );
register_nav_menu( ‘quaternary’, __( ‘Top Menu’, ‘twentythirteen’ ) );
?>
<!– CMZ add CSS file for customizing login page –>
<?php
function my_login_stylesheet() { ?>
<link rel=”stylesheet” id=”custom_wp_admin_css” href=”<?php echo get_bloginfo( ‘stylesheet_directory’ ) . ‘/style-login.css’; ?>” type=”text/css” media=”all” />
<?php }
add_action( ‘login_enqueue_scripts’, ‘my_login_stylesheet’ );
?>
<!– CMZ remove admin bar for users except admin –>
<?php
add_action(‘after_setup_theme’, ‘remove_admin_bar’);
function remove_admin_bar() {
if (!current_user_can(‘administrator’) && !is_admin()) {
show_admin_bar(false);
}}
?>
An empty functions.php file still causes the problem.
I take this back – a blank functions.php file doesn’t cause a conflict.
Let me do some more testing…
Good news – it’s working now.
I guess <!– –> commenting is not allowed in functions.php
I removed these and it works fine now.