One way to change the default behaviors of WordPress is using a file named functions.php. It goes in your Theme's folder.
The functions file behaves like a WordPress Plugin, adding features and functionality to a WordPress site. You can use it to call functions, both PHP and built-in WordPress, and to define your own functions. You can produce the same results by adding code to a WordPress Plugin or through the WordPress Theme functions file.
There are differences between the two.
A WordPress Plugin:
A functions file:
Each theme has its own functions file, but only the functions.php in the active Theme affects how your site publicly displays. If your theme already has a functions file, you can add code to it. If not, you can create a plain-text file named functions.php to add to your theme's directory.
With a functions file you can:
Beware: if a WordPress Plugin calls the same function, or filter, as you do in your functions file, the results can be unexpected -- even site-disabling.
Search the web for "WordPress functions.php" to find suggestions to enhance the functionality of your WordPress site.