
/*   
Theme Name: Cluster Vivienda
Theme URL: 
Description: 
Author: @libelulastudio
Version:
Tags: 
*/



/*  


Imagenes Thumbnail:

1 - Original
2 - 1024 x 1024
3 - 600 x 600
4 - 300 x 300
5 - 150 x 150 (functions.php)


Paginas:
1 - Home
2 - Contacto




// Plugins:
Jetpack/
Loginizer/
BackWPup/
WP Database Backup/
Google XML Sitemaps/
*/




/* //////////////////////////// GUIA


/* //////////////////////////// WP head
Permite incluir varias funciones en nuestro template
<?php wp_head(); ?>

Aplicacion:
<head>
<?php wp_head(); ?>
</head>


/* //////////////////////////// WP footer
OJO no es el footer de nuestro template sino la barra de herramientas administrativas WP
<?php wp_head(); ?>

Aplicacion:
<?php wp_footer(); ?>
</body>
</html>





/* //////////////////////////// Blog Info

/// imprimir nombre del blog
<?php bloginfo('name'); ?>

/// imprimir descripción del blog
<?php bloginfo('description'); ?>

/// imprimir url style.css
<?php bloginfo('stylesheet_url'); ?>

/// imprimir url (directorio) donde se enuentra style.css
<?php bloginfo('stylesheet_directory'); ?>

/// imprimir url de WP
<?php bloginfo('wpurl'); ?>

------------------------------

/* //////////////////////////// Loop

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

<?php the_title(); ?>
<?php the_permalink(); ?>

<?php the_post_thumbnail('thumbnail'); ?> (imagen mas chica)
<?php the_post_thumbnail('medium'); ?> (imagen mediana)
<?php the_post_thumbnail('large'); ?> (imagen más grande)
<?php the_post_thumbnail(); ?> (imagen default)
<?php the_time('j/M/y') ?>
<?php the_content(); ?>
<?php the_excerpt(); ?> 
<?php the_category(); ?> 
<?php the_author(); ?> 
<?php the_date() ?>


<?php endwhile; ?>

<?php else: ?>
...
<?php endif; ?>

------------------------------


/* //////////////////////////// Query Posts
Sirve para filtrar el loop ejems

<?php query_posts() ?>


<?php query_posts('posts_per_pages=1') ?>
(mostrar solo 1 post por página)

<?php query_posts('order=Asc') ?>
(orden ascendente)

<?php query_posts('cat=2') ?>
(Mostrar solo categoria ID 2)

<?php query_posts('order=Asc&cat=2') ?>
(combinacion 2 parametros usando &)

Aplicacion:

<?php query_posts('order=Asc') ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

------------------------------

/* //////////////////////////// Rewind Posts
<?php rewind_posts() ?>
(Sirve para prevenir bucles, por ejemplo cuando tenemos varios loops en una sola página)

Aplicacion:

<?php rewind_posts() ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

------------------------------



/* //////////////////////////// functions.php

Añadir image destacada en tema
add_theme_support('post-thumbnails');

Añadir image adicional al uploap
add_image_size('mysize, 200, 150');
Añadir image adicional al uploap ...fuerza un crop
add_image_size('mysize, 200, 150, true'); 
------------------------------
