WordPress Theme Development Part 6 – functions.php

functions.php or theme functions file is the backbone of a WordPress theme. In this file we can add WordPress hooks, enqueue stylesheets, custom posts and lots of important work we can do here.

In our themes root folder I’m creating a new file functions.php 

This file start with <?php and don’t need php closing tag here. Add this code to your functions.php

// Theme Functions File

// Theme Setup File
function travel_theme_setup() {
   /* Add filters, actions, and theme-supported features. */

add_action( 'after_setup_theme', 'travel_theme_setup' );

I added an action hook after_setup_theme. In between this hook function travel_theme_setup we can add Filters, Actions and other theme-supported file.

Leave a Reply

Your email address will not be published. Required fields are marked *