Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is the purpose of menus in WordPress?
Menus help visitors find pages and sections easily by organizing links in a clear way on your website.
Click to reveal answer
beginner
How do you create a new menu in WordPress?
Go to Appearance > Menus in the dashboard, click 'Create New Menu', name it, then add pages or links and save.
Click to reveal answer
beginner
What is a menu location in WordPress?
A menu location is a spot in your theme where a menu can appear, like the header or footer area.
Click to reveal answer
beginner
How can you add custom links to a WordPress menu?
In the Menus screen, use the 'Custom Links' box to enter any URL and link text, then add it to your menu.
Click to reveal answer
intermediate
Why is it important to use accessible menus in WordPress?
Accessible menus let all users, including those using keyboards or screen readers, navigate your site easily.
Click to reveal answer
Where do you manage menus in WordPress?
AAppearance > Menus
BSettings > General
CPlugins > Installed Plugins
DTools > Import
✗ Incorrect
Menus are managed under Appearance > Menus in the WordPress dashboard.
What can you add to a WordPress menu?
APages, posts, categories, and custom links
BOnly pages
COnly posts
DOnly images
✗ Incorrect
Menus can include pages, posts, categories, and custom links to organize navigation.
What is a menu location in WordPress?
AA user role
BA place in the theme where a menu appears
CA type of page
DA plugin for menus
✗ Incorrect
Menu locations are predefined spots in your theme to display menus.
How do you add a custom URL to a menu?
AAdd a new page
BEdit the theme files
CUse the Custom Links option in the Menus screen
DInstall a plugin
✗ Incorrect
Custom Links lets you add any URL directly to your menu.
Why should menus be accessible?
ATo improve SEO only
BTo make the site load faster
CTo add animations
DSo everyone can navigate the site easily, including those with disabilities
✗ Incorrect
Accessible menus ensure all users, including those using assistive tools, can use the site.
Explain how to create and assign a menu in WordPress.
Think about the steps from dashboard to showing the menu on your site.
You got /5 concepts.
Describe why accessible menus are important and how WordPress supports them.
Consider users who cannot use a mouse or see the screen well.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of using menus in a WordPress site?
easy
A. To add images to the website header
B. To create blog posts automatically
C. To organize links so visitors can navigate the site easily
D. To change the website's background color
Solution
Step 1: Understand the role of menus
Menus group links to help users find pages and sections on the site.
Step 2: Compare options to menu purpose
Only organizing links for easy navigation matches the menu's purpose.
Final Answer:
To organize links so visitors can navigate the site easily -> Option C
Quick Check:
Menus = Organize links for navigation [OK]
Hint: Menus help visitors find pages easily [OK]
Common Mistakes:
Thinking menus add images or change colors
Confusing menus with blog post creation
2. Which of the following is the correct way to display a registered menu in a WordPress theme?
easy
A. register_nav_menu('primary', 'Primary Menu');
B. wp_nav_menu(array('theme_location' => 'primary'));
C. add_menu_location('primary');
D. show_menu('primary');
Solution
Step 1: Identify function to display menu
wp_nav_menu() is used to show menus in themes.
Step 2: Check correct syntax for displaying menu
Passing array('theme_location' => 'primary') tells WordPress which menu to show.
Final Answer:
wp_nav_menu(array('theme_location' => 'primary')); -> Option B
Quick Check:
Display menu = wp_nav_menu() with theme_location [OK]
Hint: Use wp_nav_menu() with theme_location to show menus [OK]
Common Mistakes:
Using register_nav_menu() to display menus instead of register
Trying to use non-existent functions like add_menu_location or show_menu
3. Given this code in a WordPress theme:
wp_nav_menu(array('theme_location' => 'footer'));
What will happen if no menu is assigned to the 'footer' location?
medium
A. Nothing will display, no menu shown
B. An error message will appear on the site
C. The menu will display all pages by default
D. The site will crash with a fatal error
Solution
Step 1: Understand wp_nav_menu behavior without assigned menu
If no menu is assigned to the location, WordPress shows nothing by default.
Step 2: Check if errors or fallback occur
By default, no error or crash happens; the menu area is empty.
Final Answer:
Nothing will display, no menu shown -> Option A
Quick Check:
No assigned menu = no output, no error [OK]
Hint: No menu assigned means no menu output [OK]
Common Mistakes:
Expecting default page list to show automatically
Thinking WordPress throws errors or crashes
4. You added this code to your theme's functions.php:
register_nav_menu('header-menu', 'Header Menu');
But the menu does not appear in the WordPress admin under Appearance > Menus > Manage Locations. What is the likely problem?
medium
A. The code must be inside a function hooked to after_setup_theme
B. You need to flush permalinks to see the menu location
C. You forgot to call register_nav_menus() instead of register_nav_menu()
D. Menus only appear if you create a menu first
Solution
Step 1: Understand when to register menus
Menu registration code should run during theme setup, typically hooked to after_setup_theme.
Step 2: Check if code runs too early
Placing register_nav_menu() directly in functions.php without hook may run too early, so WordPress doesn't register it properly.
Final Answer:
The code must be inside a function hooked to after_setup_theme -> Option A
Quick Check:
Register menus inside after_setup_theme hook [OK]
Hint: Hook menu registration to after_setup_theme [OK]
Common Mistakes:
Using register_nav_menus() instead of register_nav_menu() is not required for one menu
Flushing permalinks does not affect menu registration
Assuming menus appear without registering locations
5. You want to create two menu locations in your theme: one for the header and one for the footer. Which code correctly registers both menus and displays them in the theme?
hard
A.
function register_my_menus() {
register_nav_menu('header', 'Header Menu');
register_nav_menu('footer', 'Footer Menu');
}
add_action('init', 'register_my_menus');
// In header.php
wp_nav_menu(array('theme_location' => 'header'));
// In footer.php
wp_nav_menu(array('theme_location' => 'footer'));
B.
register_nav_menus(array(
'header' => 'Header Menu',
'footer' => 'Footer Menu'
));
// In header.php
wp_nav_menu('header');
// In footer.php
wp_nav_menu('footer');
C.
function register_my_menus() {
register_nav_menus(array(
'header' => 'Header Menu',
'footer' => 'Footer Menu'
));
}
add_action('init', 'register_my_menus');
// In header.php
wp_nav_menu(array('theme_location' => 'header'));
// In footer.php
wp_nav_menu(array('theme_location' => 'footer'));
D.
function register_my_menus() {
register_nav_menus(array(
'header' => 'Header Menu',
'footer' => 'Footer Menu'
));
}
add_action('after_setup_theme', 'register_my_menus');
// In header.php
wp_nav_menu(array('theme_location' => 'header'));
// In footer.php
wp_nav_menu(array('theme_location' => 'footer'));
Solution
Step 1: Register multiple menus correctly
Use register_nav_menus() with an array of locations inside a function hooked to after_setup_theme.
Step 2: Display menus with correct syntax
Use wp_nav_menu() with theme_location keys matching registered locations.
Step 3: Check each option for correctness
function register_my_menus() {
register_nav_menus(array(
'header' => 'Header Menu',
'footer' => 'Footer Menu'
));
}
add_action('after_setup_theme', 'register_my_menus');
// In header.php
wp_nav_menu(array('theme_location' => 'header'));
// In footer.php
wp_nav_menu(array('theme_location' => 'footer'));
correctly hooks registration to after_setup_theme, uses register_nav_menus(), and displays menus properly.
Final Answer:
Option D code correctly registers and displays both menus -> Option D