diff options
author | Heckyel <heckyel@openmailbox.org> | 2017-02-20 19:28:35 -0500 |
---|---|---|
committer | Heckyel <heckyel@openmailbox.org> | 2017-02-20 19:28:35 -0500 |
commit | 7f5cb4effd041e1c86aa3e4847bac78e0498389d (patch) | |
tree | 9c482cd674f48dc2a4dd9ba80dc21ffa183bfeb5 /functions.php | |
download | lidra-theme-7f5cb4effd041e1c86aa3e4847bac78e0498389d.tar.lz lidra-theme-7f5cb4effd041e1c86aa3e4847bac78e0498389d.tar.xz lidra-theme-7f5cb4effd041e1c86aa3e4847bac78e0498389d.zip |
primera versión
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/functions.php b/functions.php new file mode 100644 index 0000000..dc5fb46 --- /dev/null +++ b/functions.php @@ -0,0 +1,37 @@ +<?php + +function libre_custom_theme_setup(){ + // Agregamos el Soporte para Thumbnails + add_theme_support('post-thumbnails'); + // Agregamos un tamaño de imagen y permitimos que la imagen se recorte si no cabe + add_image_size('homepage-thumb', 745, 372, true); + + // Agregamos el menu + $locations = array( + 'main_nav' => __('Menú Principal', 'libre'), + 'footer_nav' => __('Menú Footer', 'libre') + ); + register_nav_menus($locations); +} +add_action('after_setup_theme', 'libre_custom_theme_setup'); + +// Funcion de reemplazo a leer más +function read_more( $more ){ + $url_post = get_permalink(); + return " <a href='$url_post'><small>" . __('leer más...', 'libre') . "</small></a>"; +} +add_filter('excerpt_more', 'read_more'); + +// Funcion de widget +function widgets_activation(){ + register_sidebar( array( + 'name' => __('Sidebar', 'libre'), + 'id' => 'sidebar', + 'before_widget' => '<div class="widget"><div class="titulo-seccion">', + 'after_widget' => '</div></div>', + 'before_title' => '<h3>', + 'after_title' => '</h3>' + )); + +} +add_action('widgets_init', 'widgets_activation'); |