Skip to content

Instantly share code, notes, and snippets.

@bordoni
Created January 28, 2015 13:45
Show Gist options
  • Select an option

  • Save bordoni/a1c7248d60f4726f0845 to your computer and use it in GitHub Desktop.

Select an option

Save bordoni/a1c7248d60f4726f0845 to your computer and use it in GitHub Desktop.
Enqueue the `tribe_js_config` variable on Salient WordPress theme
<?php
/*
* Open your Functions.php file
* On your `nectar_register_js` function after the `wp_register_script` for the `nectarFrontend`, you will append the following code
*/
$js_config_array = array(
'permalink_settings' => get_option( 'permalink_structure' ),
'events_post_type' => TribeEvents::POSTTYPE
);
wp_localize_script( 'nectarFrontend', 'tribe_js_config', $js_config_array );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment