Wordpress Flashcards
What is a theme?
WordPress themes change the design of a website. Themes take content stored in Wordpress and load/display this content on the website. This makes themes capable of being used on multiple websites without showing the same content.
How do WordPress themes work?
WordPress themes are collections of files that work together to build a webpage.
What files are required for WordPress themes?
index.php, style.css.
What other files can a WordPress theme include?
Template files (see WordPress docs).
Theme vs Plugin?
Themes control presentation of content whereas a plugin controls behavior.
Explain post types.
Post types are used to categorize what type of content is being displayed. All post types are stored in the wp_posts database. Common post types are post, page, attachment. Custom post types can also be created
How does wordpress decide what template files to use for an individual screen?
Wordpress uses that query string (url parameters) to determine what template file to use.
What are template tags?
Template tags are used to retrieve content from wordpress database. They can also be used to call another theme file. get_header() and get_title() are some examples of template tags.
Explain The loop
the loop is a mechanism for outputting posts. Usually consists of a while loop that calls have_posts() function in its conditional.
What is Have_posts()
a function that checks whether there are any posts.
What is the functions.php file?
functions.php is a file containing unique features (or special functionality) for you wordpress theme.
What are wp_enqueue_script() and wp_enqueue_style()
These are enqueueing scripts to load in css and javascript files.
Explain the WordPress REST API
The WordPress Api is an interface that allows other applications to interact with your website by sending/ receiving JSON data objects.