-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunctions.php
More file actions
57 lines (36 loc) · 1015 Bytes
/
functions.php
File metadata and controls
57 lines (36 loc) · 1015 Bytes
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
49
50
51
<!--
ARCHIVO CON LAS FUNCIONES DEL TEMA. (FUNCTIONS.PHP)
-->
<?php
/*
Funciones minimas para entender un tema de WordPress.
@autor - Daniel Martínez.
@version - 1.0
@url - danmnez.me
*/
// Menu.
function menuHtml5() {
// Agregamos los parametros personalizados a la funcion de menu de WordPress.
$menuParametros = array(
'container' => false,
'echo' => false,
'items_wrap' => '%3$s',
'depth' => 0,
);
echo strip_tags(wp_nav_menu( $menuParametros ), '<li><a>' );
}
// Contenido de las paginas.
function contenidoPag() {
get_page($page_id);
$page_data = get_page($page_id);
echo "<h2> $page_data->post_title </h2>";
echo apply_filters(‘the_content’, $page_data->post_content);
}
// Barra lateral.
if(function_exists('register_sidebar'))
register_sidebar(array(
'name' => 'Barra lateral',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
?>