Lubinik Learning

Training mode

Themes & Template Hierarchy

Time remaining:

0 / 16 answered

  1. 1. Which template is the most specific conventional file for a single book CPT entry?

    The registered post type slug is book.

    Which template is the most specific conventional file for a single book CPT entry?
    Hint

    The template hierarchy includes the post type slug.

  2. 2. Which style.css header links a child theme to its parent?

    The parent theme directory is named lubinik-theme.

    Which style.css header links a child theme to its parent?
    Hint

    The value must match the parent directory name.

  3. 3. Which wp_enqueue_script() practices are correct?

    Select all correct answers.

    Which wp_enqueue_script() practices are correct?
    Hint

    Dependencies and versioning are part of the registration contract.

  4. 4. Where should a theme normally register support for features such as post thumbnails?

    Where should a theme normally register support for features such as post thumbnails?
    Hint

    The hook name describes theme initialization.

  5. 5. What is the reliable way for a child theme to load its parent and child styles?

    What is the reliable way for a child theme to load its parent and child styles?
    Hint

    Use the enqueue API rather than a CSS import.

  6. 6. Which function loads a reusable theme template part while allowing a specialized variant?

    Which function loads a reusable theme template part while allowing a specialized variant?
    Hint

    Think of template-parts/content-single.php.

  7. 7. How should a theme add a contextual CSS class to the body element?

    How should a theme add a contextual CSS class to the body element?
    Hint

    There is a dedicated filter for the generated class list.

  8. 8. Which function both translates and safely escapes plain text for HTML output?

    Which function both translates and safely escapes plain text for HTML output?
    Hint

    Combine internationalization with context-appropriate output escaping.

  9. 9. Are the parent and child theme functions.php files merged like CSS?

    Are the parent and child theme functions.php files merged like CSS?
    Hint

    A child functions.php does not replace its parent counterpart.

  10. 10. Which function returns the active theme directory, including the child theme when one is active?

    Which function returns the active theme directory, including the child theme when one is active?
    Hint

    Stylesheet and template can mean child and parent.

  11. 11. What does locate_template() do?

    What does locate_template() do?
    Hint

    It resolves a physical template file.

  12. 12. Why must classic themes call wp_head() and wp_footer()?

    Why must classic themes call wp_head() and wp_footer()?
    Hint

    Without them, enqueued assets may disappear.

  13. 13. What should a theme do before rendering a named navigation location?

    What should a theme do before rendering a named navigation location?
    Hint

    Locations belong to the theme; assigned menus belong to site content.

  14. 14. What is required before using featured images as a declared theme feature?

    What is required before using featured images as a declared theme feature?
    Hint

    Declare support during theme setup.

  15. 15. Which function registers a stylesheet for a specific block type?

    Which function registers a stylesheet for a specific block type?
    Hint

    It can avoid loading block CSS where it is not needed.

  16. 16. What does a theme content width setting primarily communicate?

    What does a theme content width setting primarily communicate?
    Hint

    It concerns rendered media dimensions.