aboutsummaryrefslogtreecommitdiffstats
path: root/functions.php
blob: dc5fb46490173252c602b227de9fa1174d5b707d (plain)
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
<?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');