What is Functions File in WordPress? Functions file commonly known as functions.php file is a WordPress theme file. It comes with all free and premium WordPress themes. The purpose of this file is to allow theme developers to define theme features and functions. This file acts just like a WordPress plugin and can be used to add your […]

Theme Functions TOPICS What is functions.php? Examples Theme Setup Automatic Feed Links Navigation Menus Load Text Domain Post Thumbnails Post Formats Initial Setup Example Content Width Other Features Your functions.php File The functions.php file is where you add unique features to your WordPress theme. It can be used to hook into the core functions of WordPress to make your theme more modular, […]


1. get_theme_mod() Retrieve theme modification value for the current theme. get_theme_mod() How get_theme_mod() works 2. add_setting() Add a customize setting. add_setting() Good explanation of add_setting() in action 4. apply_filters() Call the functions added to a filter hook. apply_filters() How to use apply_filters() 5. esc_attr() Escaping for HTML attributes. esc_attr() What is esc_attr() for? 6. get_option() […]


register_sidebar( array|string $args = array() ) Builds the definition for a single sidebar and returns the ID. Description #Description Accepts either a string or an array and then parses that against a set of default arguments for the new sidebar. WordPress will automatically generate a sidebar ID and name based on the current number of registered sidebars if those arguments are […]


wp_nav_menu( array $args = array() ) Displays a navigation menu. Parameters #Parameters $args (array) (Optional) Array of nav menu arguments. ‘menu’(int|string|WP_Term) Desired menu. Accepts a menu ID, slug, name, or object. ‘menu_class’(string) CSS class to use for the ul element which forms the menu. Default ‘menu’. ‘menu_id’(string) The ID that is applied to the ul element which forms the menu. Default is the menu slug, incremented. […]