0
0
Wordpressframework~10 mins

General settings in Wordpress - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the site title in WordPress.

Wordpress
update_option('blogname', [1]);
Drag options to blanks, or click blank then click option'
Ablogname
Bsite_title
Cget_bloginfo()
D'My New Site'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a variable name instead of a string.
Forgetting quotes around the title.
2fill in blank
medium

Complete the code to retrieve the WordPress timezone setting.

Wordpress
$timezone = get_option([1]);
Drag options to blanks, or click blank then click option'
A'gmt_offset'
B'timezone_string'
C'time_format'
D'date_format'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'date_format' or 'time_format' instead of timezone option.
Forgetting quotes around the option name.
3fill in blank
hard

Fix the error in the code to update the admin email in WordPress.

Wordpress
update_option('admin_email', [1]);
Drag options to blanks, or click blank then click option'
A'admin@example.com'
BadminEmail
Cget_admin_email()
Dadmin_email
Attempts:
3 left
💡 Hint
Common Mistakes
Passing a variable without quotes.
Using a function that does not exist.
4fill in blank
hard

Fill both blanks to get and update the WordPress site description.

Wordpress
$desc = get_option([1]);
update_option([2], 'New description here');
Drag options to blanks, or click blank then click option'
A'blogdescription'
B'site_description'
C'description'
D'blogname'
Attempts:
3 left
💡 Hint
Common Mistakes
Using different option names for get and update.
Using 'description' or 'site_description' which are incorrect.
5fill in blank
hard

Fill all three blanks to create a custom option and retrieve it in WordPress.

Wordpress
add_option([1], [2]);
$value = get_option([3]);
Drag options to blanks, or click blank then click option'
A'custom_setting'
B'custom value'
D'default_value'
Attempts:
3 left
💡 Hint
Common Mistakes
Using different option names for add and get.
Passing a variable instead of a string value.