Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/12/2010, 09:20
Avatar de JOSANCIN
JOSANCIN
 
Fecha de Ingreso: septiembre-2008
Ubicación: huesca
Mensajes: 298
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: Dos paginas (con diseño pagina principal)

Hola a todos
la pagina en cuestion es:
http://diserama.es/?page_id=19
Os pongo el codigo tal cual
La clave para filtrar, en este caso, es:
<?php query_posts('category_name=tallerphp'); ?>
fijaos donde esta
Previamente he creado la categoria tallerphp
Muestra los posts de la categoria tallerphp
Analogamente la otra pagina
http://diserama.es/?page_id=10
tiene el mismo codigo con la salvedad que para filtrar usa:
<?php query_posts('category_name=blogwordpress'); ?>
NO hace falta plugin
en caso de alguna duda escribidme e intentare ser mas claro
que vaya bien


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
body{margin:0; padding:0; font-family:verdana; font-size:12px;}
#container{width:1000px; height:600px; margin:0 auto; margin-top:-120px;}
#content{width:500px; height:600px; float:left; margin-top:20px;}
#sidebar{width:250px; height:600px; float:left; margin-top:20px;}
#fijado{ width:50%; background-color:#d2d0d1; height:120px;}
#menu{width:750px; background-color:#d2d0d1; height:120px;}
#texto{width:750px; height:70px; background-color:#d2d0d1;}
div#inicio,div#portfolio,div#blogwordpress,div#tal lerphp,div#contacto{float:left; width:150px; height:80px; padding-top:20px; text-align:center; color:white; font-size:1.6em;}
div#tallerphp{background-image:url("http://www.diserama.es/wp-content/themes/twentyten/images/headers/pentagono.png"); background-repeat:no-repeat; }
div#portfolio:hover,div#inicio:hover,div#blogwordp ress:hover,div#contacto:hover{background-image:url("http://www.diserama.es/wp-content/themes/twentyten/images/headers/pentagono.png"); background-repeat:no-repeat; }
div#azul{background-color:blue; width:150px; height:70px; margin-left:600px;}
h1{color:#0099ff; font-size:1.4em;}
a{border:0;}
img{margin-top:10px;}
.entry-content{color:#6699ff; }
ul{list-style:none;}
</style>
</head>
<body>
<?php

/*
Template Name: tallerphp
*/


?>
<div id="fijado"></div>
<div id="container">
<div id="menu">
<img src="http://www.diserama.es/wp-content/themes/twentyten/images/headers/logo.png" width=200>
</div>

<div id="texto">

<a href="http://diserama.es/"> <div id="inicio">inicio</div></a>
<div id="portfolio">portfolio</div>
<a href="http://diserama.es/?page_id=10"><div id="blogwordpress">blog wordpress</div></a>
<div id="tallerphp">taller php</div>
<div id="contacto">contacto</div>
<div id="azul"></div>
</div>
<div id="content" role="main">

<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<?php if ( is_front_page() ) { ?>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php } else { ?>
<h1 class="entry-title"><?php //the_title(); ?></h1>
<?php } ?>

<div class="entry-content">
<?php //the_content(); ?>
<?php //wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
<?php //edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-content -->
</div><!-- #post-## -->

<?php //comments_template( '', true ); ?>

<?php endwhile; ?>

<?php $temp_query = $wp_query; ?>
<?php query_posts('category_name=tallerphp'); ?>

<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>


<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title" ><?php the_title(); ?></h1>

<div class="entry-meta">
<?php twentyten_posted_on(); ?>
</div><!-- .entry-meta -->

<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
</div><!-- #post-## -->
<div id="nav-above2" class="navigation">
<div class="nav-previous"><?php //previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php //next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>

</div><!-- #nav-above -->

<?php endwhile; ?>


</div><!-- #content -->
<div id="sidebar">
<?php get_sidebar(); ?>
</div>
</div><!-- #container -->



</body>
</html>