Created
July 26, 2017 23:37
-
-
Save gydoar/674e0f76e473b5e85ad8b622c934792c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Registrando estilos | |
function flx_registrar_estilos() { | |
// registrar | |
wp_register_style('flx_styles', plugins_url('css/flexslider.css', __FILE__)); | |
// colocar | |
wp_enqueue_style('flx_styles'); | |
} | |
add_action('wp_print_styles', 'flx_registrar_estilos'); | |
// Registrando scripts | |
function flx_registrar_scripts() { | |
if (!is_admin()) { | |
// registrar | |
// en esta función registramos jquery.flexslider.js y a demás la libreria jquery desde el core de WordPress | |
wp_register_script('flx_script', plugins_url('js/jquery.flexslider.js', __FILE__), array( 'jquery' )); | |
wp_register_script('scripts', plugins_url('js/scripts.js', __FILE__)); | |
// colocar | |
wp_enqueue_script('flx_script'); | |
wp_enqueue_script('scripts'); | |
} | |
} | |
add_action('wp_print_scripts', 'flx_registrar_scripts'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment