0
0
Wordpressframework~10 mins

SEO plugins (Yoast, RankMath) 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 activate the Yoast SEO plugin in WordPress.

Wordpress
activate_plugin('[1]');
Drag options to blanks, or click blank then click option'
Aseo-by-rank-math/rank-math.php
Byoast-seo/wp-seo.php
Crank-math/rank-math.php
Dwordpress-seo/wp-seo.php
Attempts:
3 left
💡 Hint
Common Mistakes
Using the Rank Math plugin path instead of Yoast's.
Misspelling the plugin folder name.
2fill in blank
medium

Complete the code to get the SEO title using Rank Math plugin functions.

Wordpress
$seo_title = [1]();
Drag options to blanks, or click blank then click option'
Aget_rank_math_title
Brank_math_title
Crank_math_get_title
Dget_seo_title_rank_math
Attempts:
3 left
💡 Hint
Common Mistakes
Using a function name that does not exist in Rank Math.
Confusing Yoast SEO function names with Rank Math.
3fill in blank
hard

Fix the error in the code to retrieve the meta description using Yoast SEO.

Wordpress
$meta_desc = WPSEO_Meta::[1]( 'description' );
Drag options to blanks, or click blank then click option'
Aget
Bget_meta
Cget_description
Dget_value
Attempts:
3 left
💡 Hint
Common Mistakes
Using non-existing methods like get_value or get_meta.
Confusing method names with other plugins.
4fill in blank
hard

Fill both blanks to add a filter hook for modifying the SEO title in Rank Math.

Wordpress
add_filter( '[1]', '[2]' );
Drag options to blanks, or click blank then click option'
Arank_math/frontend/title
Byoast_seo_title
Cmodify_seo_title
Drank_math_modify_title
Attempts:
3 left
💡 Hint
Common Mistakes
Using Yoast SEO hook names with Rank Math filters.
Using generic or incorrect callback function names.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that filters Yoast SEO meta keys with values longer than 10 characters.

Wordpress
filtered_meta = {k: v for k, v in meta_data.items() if len(v) [1] [2] and k.[3]('yoast_') }
Drag options to blanks, or click blank then click option'
A>
B10
Cstartswith
Dendswith
Attempts:
3 left
💡 Hint
Common Mistakes
Using endswith instead of startswith.
Using less than symbol instead of greater than.