-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.php
48 lines (40 loc) · 929 Bytes
/
functions.php
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
47
48
<?php
add_theme_support('post-thumbnails');
function smart_title() {
if(is_single())
{
the_title();
return " | ";
bloginfo("name");
}
else
{
bloginfo("name");
wp_title();
}
}
function categories_has_child($cat) {
if(!$cat->category_parent) {
return true;
}
}
function get_categories_with_posts() {
$categories = get_categories();
$categories_filtered = array_filter($categories, "categories_has_child");
return $categories_filtered;
}
if(function_exists('register_sidebar')) {
register_sidebar(array(
'id' => 'sidebar',
'name' => __( 'barra lateral'),
'description' => __( 'widgets para a barra lateral'),
'before_widget' => '<li class="box widget">',
'after_widget' => '</li>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
}
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
}
?>