Wordpress- Function defined in functions.php is not found -


i have following setup in wordpress theme:

in functions.php have defined function called function listing_pins()

in functions.php have

    add_action('wp_enqueue_scripts', 'load_scripts');      function load_scripts() {        wp_enqueue_script('googlecode_regular', get_template_directory_uri().'/js/google_js/google_map_code.php',array('jquery'), '1.0', true);      } 

and google_map_code.php file

  header("content-type: text/javascript");   include_once("{$_server['document_root']}/wp-load.php");    $general_latitude =  get_option('wp_estate_general_latitude','');   $general_longitude=  get_option('wp_estate_general_longitude','');   $place_markers=listing_pins();   .... 

i'm not gonna list whole functions since don't think not relevant question.

the setup above works on server on client setup receive

fatal error: call undefined function listing_pins() in /home/content/64/45654654/html/blue/wp-content/themes/wpestax/js/google_js/google_map_code_home.php on line 6

is i;m doing wrong ? wordpress not aware of things defined in functions.php when use wp_enqueue_script ? in case why works on server , not on client one.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -