What are commonly used WordPress theme functions?
| Function | Use |
|---|---|
| get_header(), get_footer(), get_sidebar() | Load header.php, footer.php, sidebar.php |
| wp_head(), wp_footer() | Hooks for scripts, styles and plugins. Needed in every theme |
| bloginfo( ‘name’ ) | Prints site details |
| home_url(), site_url() | Site addresses |
| the_title(), the_content(), the_excerpt() | Post details in the loop |
| the_permalink(), the_post_thumbnail() | Post link and featured image |
| wp_nav_menu() | Print a menu |
| dynamic_sidebar() | Print a widget area |
| get_template_part() | Load a reusable file |
| get_template_directory_uri() | URL of the theme folder |
Tags that start with the_ print, while get_the_ versions return the value. See Theme Files and Functions.
Learn more about the similar topics:
| Tutorials |
|---|
| WordPress Themes |
| WordPress Top Theme List |
| WordPress Theme Files and Functions |
| WordPress Template Hierarchy |
| WordPress Enqueue Scripts and Styles |
| WordPress Loop |
| WordPress WP_Query Class |