Like everything else in this theme,
functions.php is modularized, and its partials are located in
functions folder. Your own custom functions and code snippets should be be put in
WordPress standard theme setup, where theme supports are registered. (Read about add_theme_support() (opens new window) on the WordPress docs for reference).
Image sizes definitions. These are technically part of the theme setup as described above, and placed on a separate file for convenience. These definitions are meant to be edited on a per-project basis, according to specific sizes required by custom templates (Read about add_image_size() (opens new window) on the WordPress docs for reference).
Registers navigation menus. (Read about Navigation Menus (opens new window) on the WordPress docs for reference).
Registers sidebars. (Read about Sidebars (opens new window) on the WordPress docs for reference).
Includes WP Bootstrap Nav Walker, to integrate Bootstrap dropdown navs with WordPress native menu manager. (Read about wp-bootstrap-navwalker (opens new window) on its docs).
Custom Post Types and Custom Taxonomies definitions. Every
*.php file inside this folder will be automatically loaded in to the theme. Two boilerplate
*.php.sample files are already present and can be used a starting points to define your custom content. (Read about Custom Post Types (opens new window) and Custom Taxonomies (opens new window) on the WordPress docs or on GenerateWP (opens new window)).
Enables some global functions that could be useful in most projects.
brk_svg_mimetype()enable support for uploading SVG.
brk_excerpt_length()defines the length of post's excerpts (disabled by default, uncomment its filter to enable it).
brk_thumbnail_alt()custom template tag to retrive the
altvalue of an attachment image.
brk_breadcrumbs()custom template tag to display breadcrumbs generated with Yoast or Rank Math, integated with Bootstrap CSS styles (you can use Bootstrap variables for customization).
wp-bootstrap-nav-walkerto use Bootstrap 5 standards.
Some integrations with Advanced Custom Fields. (more info about this on the Advanced Custom Field page of this documentation).
Some integrations with Contact Form 7. Disabled by default, you can enable this by uncommenting the relevant line inside
functions.php. (more info about this on the Contact Form 7 page of this documentation).
A function to restrict the search results only to certain post types. Disabled by default, you can enable this by uncommenting the relevant line inside
Various functions used to disable a lot of unnecessary stuff that WordPress loads on the HTML
<head> of the site pages. (more info about this on the Cleanup page of this documentation).
This file is where you should place your own custom functions and code snippets that you might want to add to your site.