There are many built-in WordPress functions that we use in theme customization. Here are some of the mostly used WordPress theme functions:
get_template_directory_uri() – Retrieve template directory URI for the current theme. In the event that a child theme is being used, the parent theme directory URI will be returned. Use get_stylesheet_directory_uri() to include resources that are intended to be included in/overridden by the child theme.wp_head() – The wp_head action hook is triggered within the & section. You use this hook by having your function echo output to the browser in HTML head. Most of default actions into the ‘wp-head’ hook by WordPress core. You might use it to include your own js/css and other meta into the WordPress.wp_nav_menu() – Displays a navigation menu created in the Appearance → Menus panel. For example: ‘Project Nav’ )); ?>home_url()– The home_url template tag retrieves the home URL for the current site- e_()- Displays the returned translated text from translate()
get_sidebar() – Includes the sidebar.php template file from your current theme’s directory.get_header()– Includes the header.php template file from your current theme’s directory.wp_link_pages()– Displays page-links for paginated posts (Next page & Previous Page)edit_post_link()– display link to edit current post from dashboard
Learn more about the similar topics:
| Tutorials |
| No Content Found. |
| Exercises & Assignments |
| No Content Found. |
| Interview Questions & Answers |
| No Content Found. |