0
0
Wordpressframework~20 mins

Permalink structure in Wordpress - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Permalink Pro
Get all challenges correct to earn this badge!
Test your skills under time pressure!
component_behavior
intermediate
1:30remaining
How does WordPress handle a custom permalink structure with %postname%?
If you set your permalink structure to /%postname%/, what will be the URL for a post titled "Hello World"?
Ahttps://example.com/?p=hello-world
Bhttps://example.com/hello-world/
Chttps://example.com/2024/hello-world/
Dhttps://example.com/category/hello-world/
Attempts:
2 left
💡 Hint
Think about how %postname% replaces the slug in the URL.
📝 Syntax
intermediate
1:30remaining
Which permalink structure is valid for including year, month, and post ID?
Choose the correct permalink structure to show year, month, and post ID in the URL.
A/%year%/%monthnum%/%post_id%/
B/%year%/%post%/%id%/
C/%year%/%month%/%postid%/
D/%y%/%m%/%pid%/
Attempts:
2 left
💡 Hint
WordPress uses specific tags like %year%, %monthnum%, and %post_id%.
state_output
advanced
2:00remaining
What is the effect of changing permalink structure on existing links?
After changing the permalink structure from /%year%/%postname%/ to /%postname%/, what happens to old URLs?
AOld URLs show the homepage instead of the post.
BOld URLs automatically redirect to new URLs without any setup.
COld URLs continue to work without any change.
DOld URLs return 404 errors unless redirects are set up.
Attempts:
2 left
💡 Hint
Think about how WordPress handles URL changes without redirects.
🔧 Debug
advanced
2:00remaining
Why does WordPress show a 404 error after setting a custom permalink?
You set a custom permalink structure but all posts show 404 errors. What is the most likely cause?
AThe .htaccess file is missing or not writable.
BThe WordPress theme is incompatible.
CThe post titles are too long.
DThe database is corrupted.
Attempts:
2 left
💡 Hint
Permalinks rely on server rewrite rules.
🧠 Conceptual
expert
2:30remaining
How does WordPress prioritize permalink matching when multiple structures overlap?
If you have two custom post types with similar permalink structures, how does WordPress decide which content to show?
AWordPress throws an error due to ambiguous URLs.
BWordPress merges both post types and shows combined content.
CWordPress matches the first registered rewrite rule that fits the URL.
DWordPress shows a list of all matching posts from both types.
Attempts:
2 left
💡 Hint
Rewrite rules are checked in order of registration.