WordPress Twenty-Sixteen Theme: index.php

Function Calls

These functions are referenced in the order they first appear within the file rather than alphabetical.

  • get_header() – Code Reference
  • have_posts() – Code Reference – Check if there are posts that should be displayed.1TODO: Come back to this, explain how it determines if posts should display and which ones.
  • is_home() – Code Reference – The naming here is unfortunate. This would be more aptly named something like is_blog_home(). It is checking for the page that has been set as the posts page in WP Settings.
  • is_front_page() – Code Reference
  • single_post_title() – Code Reference
  • the_post() – Code Reference
  • get_template_part() – Code Reference – Lets on pull in reusable code rather than coding it into each page separately.
  • get_post_format() – Code Reference – Are we pulling in a page, post, or other type of post format? Again, naming is unfortunate here, post is used of all different types of items (pages, images, posts) within WP but is also specifically used regarding an individual blog post.
  • the_posts_pagination() – Code Reference
  • get_sidebar() – Code Reference
  • get_footer() – Code Reference

IDs and Classes

  • Opening Div:
    • ID: primary
    • Class: content-area
  • Main:
    • ID: main
    • Class: site-main
    • Role: main
  • Header
  • Page Content Header (H1):
    • Classes: page-title, screen-reader-text