0
0
Wordpressframework~20 mins

Multisite network basics in Wordpress - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
πŸŽ–οΈ
Multisite Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What is the primary purpose of a WordPress Multisite Network?
Choose the best description of what a WordPress Multisite Network does.
AIt allows managing multiple WordPress sites from a single WordPress installation.
BIt creates a backup of a WordPress site automatically every day.
CIt improves the speed of a single WordPress site by caching pages.
DIt converts a WordPress site into a mobile app automatically.
Attempts:
2 left
πŸ’‘ Hint
Think about how many sites you can control with one WordPress setup.
❓ component_behavior
intermediate
1:30remaining
What happens when you enable Multisite in WordPress?
After enabling Multisite, which of the following is true about the WordPress admin dashboard?
AYou lose access to the original site’s dashboard.
BYou get a new Network Admin dashboard to manage all sites.
CThe dashboard automatically deletes all plugins.
DThe dashboard changes color but no new features appear.
Attempts:
2 left
πŸ’‘ Hint
Think about how you would manage multiple sites from one place.
πŸ“ Syntax
advanced
2:00remaining
Which code snippet correctly enables Multisite in wp-config.php?
Select the correct line to add to wp-config.php to enable Multisite.
Adefine('ALLOW_MULTISITE', true);
Bdefine('ENABLE_MULTISITE', true);
Cdefine('MULTISITE_ENABLE', true);
Ddefine('WP_ALLOW_MULTISITE', true);
Attempts:
2 left
πŸ’‘ Hint
Look for the exact constant WordPress expects to enable Multisite.
❓ state_output
advanced
2:00remaining
What is the effect of the following code in a Multisite environment?
Given this code in a plugin activated network-wide, what will get_bloginfo('name') return on site ID 3?
Wordpress
<?php
switch_to_blog(3);
$name = get_bloginfo('name');
restore_current_blog();
echo $name;
?>
AIt outputs the site title of the current site before switching.
BIt causes a fatal error because switch_to_blog is not allowed.
CIt outputs the site title of site ID 3.
DIt outputs nothing because restore_current_blog clears the output.
Attempts:
2 left
πŸ’‘ Hint
Think about what switch_to_blog does before calling get_bloginfo.
πŸ”§ Debug
expert
2:30remaining
Why does this Multisite plugin activation code fail on some sites?
This code is in a plugin activated network-wide. It tries to add a custom option to each site but only works on the main site. Why?
ABecause add_option runs only once on the main site, not on each site in the network.
BBecause network_admin_menu hook does not exist in Multisite.
CBecause add_option requires a site ID parameter in Multisite.
DBecause plugins cannot add options in Multisite networks.
Attempts:
2 left
πŸ’‘ Hint
Consider when and where add_option runs in a network-wide plugin.