-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
46 lines (33 loc) · 1.3 KB
/
functions.php
File metadata and controls
46 lines (33 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
function styles(){
wp_enqueue_style('style', get_stylesheet_uri());
wp_register_script('mi-script', get_bloginfo('template_directory'). '/js/yakscript.js', array('jquery'), '1', true );
wp_enqueue_script('mi-script');
// if(!is_admin()){
// wp_deregister_script('jquery');
// wp_register_script('jquery', "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js", false,'2.2.1',true);
// wp_enqueue_script('jquery');
// }
}
//hook
add_action('wp_enqueue_scripts', 'styles');
//personalizando funcion the_excerpt()
function custom_excerpt_length($length) {
return 20;
}
add_filter('excerpt_length', 'custom_excerpt_length');
//funcion para configurara el final de el extracto
function excerpt_final($more) {
return '...';
}
add_filter('excerpt_more', 'excerpt_final');
function custom_theme(){
add_theme_support('post-thumbnails');
}
add_action('after_setup_theme', 'custom_theme');
//desactivar barra admin
add_filter( 'show_admin_bar', '__return_false' );
//Registrar nuevo menu
register_nav_menus(array(
'Main menu' => __('Main menu', 'CodeY4k')
));