## Cannot call function from Functions.php in template

Question

I have a custom php file in wp-content/themes/xxxx/modules/custom.php and i want to call function from Functions.php. Right now all my functions (same function) everywhere in different files, because still cannot solve this problem.

I want to create a function in Functions.php and call this function from everywhere in the website. This function will called from another php files (Ajax will not call this function). When I include or require any file (wp-load, wp-blog-header, functions.php are not imported)

I read many forums and tried many ways like

1.

define('WP_USE_THEMES', true);


2.

include (/opt/bitnami/apps/wordpress/htdocs/wp-content/themes/xxx/functions.php);


3.

require(\$_SERVER['DOCUMENT_ROOT'] . '/wp-load');