Themes Flashcards
Q: What is a WordPress theme?
A: A collection of files that define the design and layout of a WordPress site.
Q: Where are WordPress themes stored?
A: In the wp-content/themes directory.
Q: What is the minimum requirement for a WordPress theme?
A: An index.php file and a style.css file.
Q: What is the purpose of the style.css file in a theme?
A: To define the theme’s metadata and styling rules.
Q: What is the purpose of the index.php file in a theme?
A: It serves as the default fallback template in the WordPress template hierarchy.
Q: What is the Template Hierarchy?
A: A system WordPress uses to decide which template file to use for a given page.
Q: What template file is used for single blog posts?
A: single.php.
Q: What template file is used for pages?
A: page.php.
Q: What template file is used for the homepage?
A: home.php or front-page.php.
Q: What is the fallback template file in the Template Hierarchy?
A: index.php.
Q: What is a child theme?
A: A theme that inherits the functionality of another theme (the parent theme).
Q: How do you enqueue stylesheets in a theme?
A: Using the wp_enqueue_style() function in the functions.php file.
Q: How do you enqueue scripts in a theme?
A: Using the wp_enqueue_script() function in the functions.php file.
Q: What is the purpose of the functions.php file in a theme?
A: To add custom functionality to a WordPress theme.
Q: What is the purpose of the header.php file in a theme?
A: To contain the HTML and PHP code for the site’s header section.
Q: What is the WordPress Customizer?
A: A tool that allows users to customise their site’s appearance in real time.