Bird
0
0

What is the correct way to add support for featured images in a WordPress theme?

easy📝 Conceptual Q1 of 15
Wordpress - Content Management
What is the correct way to add support for featured images in a WordPress theme?
AAdd <code>enable_featured_images();</code> in the header.php file
BAdd <code>set_post_thumbnail_support(true);</code> in the style.css file
CAdd <code>add_theme_support('post-thumbnails');</code> in the theme's functions.php file
DAdd <code>featured_image_support = true;</code> in the index.php file
Step-by-Step Solution
Solution:
  1. Step 1: Locate the theme's functions.php file

    This file is where theme features are registered in WordPress.
  2. Step 2: Add the function add_theme_support('post-thumbnails');

    This function enables featured image support for posts and pages.
  3. Final Answer:

    Add add_theme_support('post-thumbnails'); in the theme's functions.php file -> Option C
  4. Quick Check:

    Enable featured images = add_theme_support('post-thumbnails') [OK]
Quick Trick: Use add_theme_support('post-thumbnails') in functions.php [OK]
Common Mistakes:
  • Trying to enable featured images in style.css or header.php
  • Using incorrect function names like enable_featured_images()
  • Adding support outside functions.php

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Wordpress Quizzes