functions.php Bug in theme
-
I just made my first theme and added a functions.php file after testing it because I needed to add a custom navigation menu plugin. All I put in the function.php file was
<?php
/* Theme Mega Menu. */
function register_my_menus() {
register_nav_menus(
array( ‘header-menu’ => __( ‘Header Menu’ ) )
);
}
add_action( ‘init’, ‘register_my_menus’ );?php>
this is all that is in the themes functions.php and everything worked fine to let me add the menu plugin but when I go into my editor to update a page of my theme, it updates but makes the whole page in my wordpress dashboard go completely blank(white). If I go back everything on my site updates and is fine but anytime I update this bug happens. If I remove functions.php from my theme everything is back to normal.
What should I do to fix this? Do I need to cenfig my functions file with something or add more statements of some sort.
Thanks for your patience as this is my first theme ever.
- The topic ‘functions.php Bug in theme’ is closed to new replies.