presentacion wp versión pdf

25
Wordpress Modificar y crear temas domingo 15 de noviembre de 2009

Upload: jose-fonseca

Post on 12-May-2015

1.888 views

Category:

Design


3 download

DESCRIPTION

Algunos datos para modificar y crear plantillas para Wordpress.

TRANSCRIPT

Page 1: Presentacion Wp Versión PDF

WordpressModificar y crear temas

domingo 15 de noviembre de 2009

Page 2: Presentacion Wp Versión PDF

¿Qué es?

Inicialmente un editor de blogs

Hoy un CMS

domingo 15 de noviembre de 2009

Page 3: Presentacion Wp Versión PDF

¿Qué podemos hacer?

Editar una plantilla

Crear una plantilla

domingo 15 de noviembre de 2009

Page 4: Presentacion Wp Versión PDF

Editar una plantilla

domingo 15 de noviembre de 2009

Page 5: Presentacion Wp Versión PDF

EP-plantillas

Google

domingo 15 de noviembre de 2009

Page 6: Presentacion Wp Versión PDF

EP-pagadas y gratis

WooThemeshttp://www.woothemes.com/themes/

Wordpresshttp://wordpress.org/extend/themes/

domingo 15 de noviembre de 2009

Page 7: Presentacion Wp Versión PDF

EP-estructuraheader.php - Sección de cabecera

index.php - Sección principal

sidebar.php - Sección lateral

footer.php - Sección de pie de página

single.php - Plantilla de Post

page.php - Plantilla de página

comments.php - Plantilla de comentarios

search.php - Búsqueda de contenidos

searchform.php - Formulario de búsqueda

archive.php - Archivo

functions.php - Funciones especiales

404.php - Página de error 404

domingo 15 de noviembre de 2009

Page 8: Presentacion Wp Versión PDF

EP-index.php

header.php - Sección de cabecera

index.php - Sección principal

sidebar.php - Sección lateral

footer.php - Sección de pie de página

single.php - Plantilla de Post

page.php - Plantilla de página

comments.php - Plantilla de comentarios

search.php - Búsqueda de contenidos

searchform.php - Formulario de búsqueda

archive.php - Archivo

functions.php - Funciones especiales

404.php - Página de error 404

index.phpheader.php footer.php

domingo 15 de noviembre de 2009

Page 9: Presentacion Wp Versión PDF

EP-index.phpsidebar.php

domingo 15 de noviembre de 2009

Page 10: Presentacion Wp Versión PDF

EP-modificar fechaactual

http://www.bigfenomeno.com/

originalhttp://wptheme.net/cutline-3-column-right-11-free-wordpress-theme

domingo 15 de noviembre de 2009

Page 11: Presentacion Wp Versión PDF

EP-modificar fechaoriginal

<h4>May 18th, 2009<!-- by admin --> · <a href="http://themes.hirewordpressexperts.com/?p=13#respond" title="Comment on This is a random post">No Comments</a></h4>

<h4><?php the_time('F jS, Y') ?><!-- by <?php the_author() ?>--> &middot; <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></h4>

<div class="post-date"> <span class="post-day">06</span> <span class="post-month">Nov</span> </div> <h2> <a href="http://www.bigfenomeno.com/2009/11/reed-rader/" rel="bookmark" title="Permanent Link to REED + RADER">REED + RADER</a> </h2> <p class="autor">Por Franci</p><div class="clear"></div> <div class="entry">

<div class="post-date"> <span class="post-day"><?php the_time('d') ?></span> <span class="post-month"><?php the_time('M') ?></span> </div> <h2> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> </h2> <p class="autor">Por <?php the_author(); ?></p> <div class="clear"></div> <div class="entry"> <?php the_content('[Read more &rarr;]'); ?> </div>

nuevo

domingo 15 de noviembre de 2009

Page 12: Presentacion Wp Versión PDF

EP-excerpt

php <div class="post-date-aside"> <span class="post-day-aside">29</span> <span class="post-month-aside">Oct</span> </div> <h2> <a href="http://www.bigfenomeno.com/2009/10/the-only-hope/" rel="bookmark" title="Permanent Link to THE ONLY HOPE">THE ONLY HOPE</a> </h2> <div class="clear-aside"></div> <div class="entry-aside"> <p>Hace mucho tiempo que no tenía una razón tan linda y un flyer tan bueno como para ir a una fiesta.<br>No sorteamos entradas, nosotros también pagamos.<br>Amenizan_<br>gepe<br>Astudillo<br>Chuligarridos<br>Cristián Araya</p> </div> <p class="tagged-aside"><span class="add_comment"><a href="http://www.bigfenomeno.com/2009/10/the-only-hope/#respond" title="Comment on THE ONLY HOPE">→ No Comments</a></span></p>

HTML<div class="post-date-aside"> <span class="post-day-aside"><?php the_time('d') ?></span> <span class="post-month-aside"><?php the_time('M') ?></span> </div> <h2> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> </h2> <div class="clear-aside"></div> <div class="entry-aside"> <?php the_excerpt('[Read more &rarr;]'); ?> </div>

domingo 15 de noviembre de 2009

Page 13: Presentacion Wp Versión PDF

EP-fondo

php

body { color: #666666; margin: 0px; padding: 0px 0px 30px; font-family: "Lucida", Helvetica, Arial; font-size: 75%; line-height: 150%; background-color: #7A0000; background-image: url(images/fdoPrueba.jpg); background-repeat: no-repeat; background-position: center top;}

domingo 15 de noviembre de 2009

Page 14: Presentacion Wp Versión PDF

EP-colores y fuentes

a { color: #46a3ff; text-decoration: none;}

domingo 15 de noviembre de 2009

Page 15: Presentacion Wp Versión PDF

EP-estructura<?php get_header(); ?><!-- Container --><div class="CON"><img src="http://www.corralco.com/site/wp-content/uploads/2009/10/findetemporada.jpg" alt="fin de temporada" /><!-- Start SC --><div class="SC">

<div class="tit-tuit"><img src="http://www.corralco.com/site/wp-content/themes/illacrimo/images/tuit-icon.png" width="61" height="40" alt="tuiticon" /><h2><a href="http://www.twitter.com/corralco">Corralco Twitter &raquo;</a></h2></div><div class="clear"></div><div class="tuit"><?php aktt_sidebar_tweets(); ?></div><div class="clear"></div><?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?><div class="Post" id="post-<?php the_ID(); ?>" style="padding-bottom: 40px;">

<div class="PostHead"><h1><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1><small class="PostAuthor">Author: <?php the_author() ?> <?php edit_post_link('Edit'); ?></small><p class="PostDate"><small class="day"><?php the_time('j') ?></small><small class="month"><?php the_time('M') ?></small><small class="year"><? // php the_time('Y') ?></small></p></div> <div class="PostContent"><?php the_content('Read the rest of this entry &raquo;'); ?></div><div class="PostDet"> <li class="PostCom"><?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?></li> <li class="PostCateg">Filed under: <?php the_category(', ') ?></li></div></div>

<!--<?php trackback_rdf(); ?>--><div class="clearer"></div><?php endwhile; ?> <div class="Nav"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>

<?php else : ?><h2><?php _e('Not Found'); ?></h2><p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?></div> <!-- End SC -->

<?php get_sidebar(); ?><?php trackTheme("illacrimo"); ?>

<!-- Container --></div>

<?php get_footer(); ?>

domingo 15 de noviembre de 2009

Page 16: Presentacion Wp Versión PDF

Crear una plantilla

domingo 15 de noviembre de 2009

Page 17: Presentacion Wp Versión PDF

CP-inicio<?php/** * @package WordPress * @subpackage Default_Theme */

get_header(); ?>

<!-- contenido INICIO --> <div id="bloque-padd-10"> <div id="lo-nuevo" class="span-24"><div class="span-20"> <div class="clear"></div> <div class="span-4" id="pub"> <!--post pub INICIO--> <?php $i = 1;?> <?php $my_query = new WP_Query('category_name=pub-izq&showposts=3'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID;?> <?phpif ($i == 3){ echo "<div class=\"span-4 last ult-pub\">";}else{ echo "<div class=\"span-4 last\">";}

?> <div class="entry"> <a href="<?php echo get_post_meta($post->ID, "pub_link",

true); ?>"><img src="<?php bloginfo('wpurl'); ?><?php echo get_post_meta($post->ID, "pub_izq_thumb", true); ?>" height="265" /></a> </div> </div>

<?php $i = $i + 1 ; endwhile; ?>

<!--post pub FIN-->

</div> <div class="span-16 last"> <div class="span-16 last"> <!--Lo Nuevo INICIO--> <?php $i = 1;?> <?php $my_query = new WP_Query('category_name=lo-nuevo&showposts=4'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID;?> <?php

if (pow (-1,$i) > 0) { echo "<div class=\"span-8 margen-abajo-10 last\">";

}else{ echo "<div class=\"span-8 margen-abajo-10\">";}

?>

<div class="padding-10-all"> <div id="video"> <? include('includes/foto_o_video.php'); ?> </div> <div class="posteos"> <div class="post-title titulo-2-col"> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> </div> <div class="texto-2-col-first"> <?php $excerpt = get_the_excerpt(); echo truncate2($excerpt,400,'...'); ?> </div> <div class="leer-mas"><a href="<?php the_permalink() ?>">leer m&aacute;s &raquo;</a></div></div></div> </div> <?php $i = $i + 1 ;

domingo 15 de noviembre de 2009

Page 18: Presentacion Wp Versión PDF

CP-inicio

Inicialmente sitio en duro

No todo el sitio, solo las páginas necesarias

Yo uso Blueprintcss ( http://www.blueprintcss.org/ )

Luego segmentar y probar en duro

Si funciona cambiar contenido estático por dinámico

domingo 15 de noviembre de 2009

Page 19: Presentacion Wp Versión PDF

CP-inicio

domingo 15 de noviembre de 2009

Page 20: Presentacion Wp Versión PDF

CP-el loop

if (have_posts()) : while (have_posts()) : the_post(); the_content(); endwhile;endif;

<?php $i = 1;?> <?php $my_query = new WP_Query('category_name=pub-izq&showposts=3'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID;?> <div class="span-4 last"> <div class="entry"> <a href="<?php echo get_post_meta($post->ID, "pub_link", true); ?>"><img src="<?php bloginfo('wpurl'); ?><?php echo get_post_meta($post->ID, "pub_izq_thumb", true); ?>" height="265" /></a> </div> </div><?php $i = $i + 1 ; endwhile; ?>

domingo 15 de noviembre de 2009

Page 21: Presentacion Wp Versión PDF

CP-html»php

<div class="span-8 last"><div class="padding-10-all"> <div id="video"><img src="images/post-01.jpg" width="290" height="191" alt="dgb" /></div> <div class="posteos"> <div class="titulo-2-col"><a href="#">Nike Air Trainer III Penny Hardaway</a></div> <div class="texto-2-col"> &quot;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</div> <div class="leer-mas"><a href="#">leer más »</a></div> </div> </div></div>

<div class="span-16 last"> <div class="span-16 last"> <!--Lo Nuevo INICIO--> <?php $i = 1;?> <?php $my_query = new WP_Query('category_name=lo-nuevo&showposts=4'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID;?> <?php

if (pow (-1,$i) > 0) { echo "<div class=\"span-8 margen-abajo-10 last\">";}else{ echo "<div class=\"span-8 margen-abajo-10\">";}

?> <div class="padding-10-all"> <div id="video"> <? include('includes/foto_o_video.php'); ?> </div> <div class="posteos"> <div class="post-title titulo-2-col"> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> </div> <div class="texto-2-col-first"> <?php $excerpt = get_the_excerpt(); echo truncate2($excerpt,400,'...'); ?> </div> <div class="leer-mas"><a href="<?php the_permalink() ?>">leer m&aacute;s &raquo;</a></div></div></div> </div> <?php $i = $i + 1 ; //the_ratings(); endwhile; ?><!--Lo Nuevo FIN--><div class="clear"></div> </div>

domingo 15 de noviembre de 2009

Page 22: Presentacion Wp Versión PDF

CP-sidebar<div id="col-der" class="span-10 last"> <div class="span-10 last fdo-mailinglist"> <div class="span-8 ingresa-mail"> <form id="form1" name="form1" method="post" action=""> <input name="mailinglist" type="text" id="mailinglist" value="Suscribete para recibir AC en tu correo" /> <div class="clear"></div> </form></div> <div class="span-2 last bot-zapa"><a href="#"><img src="images/zapatilla.png" width="50" height="29" alt="df" /></a></div> </div> <div class="span-10"> <div id="ranking" class="span-10 last"> <div id="tit-ranking" class="span-10 last"> <div class="titulo-seccion-interior primero"><a href="#"><img src="images/titulo-ranking.png" width="350" height="50" alt="fdfs" /></a></div> </div> <div class="span-2"> <div class="padding-10-all"><img src="images/ranking-interior-01.png" alt="kk" width="55" height="51" /> <div class="ranking-interior"><a href="#"><img src="images/01.png" width="28" height="28" alt="dsf" /></a></div> </div> </div> <div class="span-2"> <div class="padding-10-all"><img src="images/ranking-interior-01.png" alt="kk" width="55" height="51" /> <div class="ranking-interior"><a href="#"><img src="images/02.png" width="28" height="28" alt="dsf" /></a></div> </div> </div> <div class="span-2"> <div class="padding-10-all"><img src="images/ranking-interior-01.png" alt="kk" width="55" height="51" /> <div class="ranking-interior"><a href="#"><img src="images/03.png" width="28" height="28" alt="dsf" /></a></div> </div> </div> <div class="span-2"> <div class="padding-10-all"><img src="images/ranking-interior-01.png" alt="kk" width="55" height="51" /> <div class="ranking-interior"><a href="#"><img src="images/04.png" width="28" height="28" alt="dsf" /></a></div> </div> </div>

<!-- columna derecha INICIO --> <div id="col-der" class="span-10 last"> <div class="span-10 last contenedor-mailinglist-interior"> <div class="ingresa-mail"><div class="cont-mailing-hor"> <?php stnl_subscribe(‘Subscribe’); ?></div></div> </div> <div class="span-10 last"> <div class="titulo-seccion-interior"> <a href="#"><img src="<?php bloginfo('template_url'); ?>/images/titulo-ranking.png" width="350" height="50" alt="sdf" /></a> </div> <div id="ranking" class="span-10 last">

<?php $i = 1;?>

<?php if (function_exists('get_highest_score_category')):

$arreglo = get_highest_score_category(18, 'both', 0, 5);//echo $arreglo;$tricky = explode("x", $arreglo);

foreach($tricky as $key => $value) {if($value == "" || $value == " " || is_null($value)) {unset($tricky[$key]);}}

$tricky = array_reverse($tricky);

for( $k = 0; $k < count($tricky); $k++) { ?> <?phpif ($i == 5){ echo "<div class=\"span-2 last\">";}else{ echo "<div class=\"span-2\">";}

?> <div class="entry padding-10-all"> <a href="<?php echo get_permalink($tricky[$k]); ?>"><?php //echo $tricky[$k]; ?><img src="<?php bloginfo('wpurl'); ?><?php echo get_post_meta($tricky[$k], "ranking_thumb", true); ?>" alt="kk" width="55" height="47" /></a> <div class="margen-up-10"> <? include('ranking_home.php'); ?>

domingo 15 de noviembre de 2009

Page 23: Presentacion Wp Versión PDF

CP-temp pages

domingo 15 de noviembre de 2009

Page 24: Presentacion Wp Versión PDF

CP-temp pages<?php/** * @package WordPress * @subpackage Default_Theme */ /*Template Name: grilla2xn Marcas*/

get_header();?>

<div id="bloque-padd-10-interior"> <!-- contenido central INICIO --> <div id="lo-nuevo-interior" class="span-14"> <div class="clear"></div> <div id="contenido" class="span-14 last"> <!--loop-post-detalle--> <div id="content" class="widecolumn"><div class="txto-inicio"><span class="titulo">Marcas:</span><br />B&uacute;scalas por marca. Toda la info de cada marca aqui. </div><!--el post-->

<?php $i = 1;?>

<?php $my_query = new

WP_Query('category_name=marcas&showposts=99'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID;?> <?php

if (pow (-1,$i) > 0) { echo "<div class=\"span-7 margen-abajo-10 last\">";}

else{ echo "<div class=\"span-7 margen-abajo-10\">";}

?>

<div class="padding-10-all"> <div id="video"><a href="<?php bloginfo('wpurl'); ?>/category/<?php echo get_post_meta($post->ID, "marca_link", true); ?>" rel="bookmark" title="Permanent Link to <?php //the_title(); ?>"><img src="<?php bloginfo('wpurl'); ?><?php echo get_post_meta($post->ID, "marcas_thumb_interior", true); ?>" width="250" height="170" /></a></div> </div> </div> <?php $i = $i + 1 ; endwhile; ?>

<!--fin del post--> <div class="clear"></div> </div> <!--loop-post-detalle--> </div> </div> <!-- contenido central FIN --> <!-- columna derecha INICIO-en single --> <? include('includes/columna-derecha-inc.php'); ?> <!-- columna derecha FIN --> <div class="clear"></div></div> <div class="clear"></div>

<?php get_footer(); ?>

domingo 15 de noviembre de 2009

Page 25: Presentacion Wp Versión PDF

:)gracias

domingo 15 de noviembre de 2009