aboutsummaryrefslogtreecommitdiffstats
path: root/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php37
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 "&nbsp;<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');