Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/09/2009, 19:33
hydra1ysk
 
Fecha de Ingreso: octubre-2008
Mensajes: 75
Antigüedad: 15 años, 7 meses
Puntos: 0
Bastante mal extructurado mi search.php?

Hola

Mi actual theme me ha traido mas de algun problema. Ahora es el tema de busqueda (search.php), ya que no me gusta como devuelve el resultado de busqueda mi sitio. Viendo el codigo veo que estos dos archivos (search.php e index.php) son iguales. Miren el codigo:

INDEX.PHP
Código:
<?php get_header(); ?>
<div id="before_main">
<div id="main">
<?php get_sidebar(); ?>
<div id="column3">
	<div id="column3_content" class="clearfix">
	 <?php if(have_posts()) : ?>
	 <?php while(have_posts()) : the_post(); ?>
	 <div class="post">
		<div class="post-date">
			<div class="post-month"><?php the_time('M') ?></div>
			<div class="post-day"><?php the_time('d') ?></div>
		</div>
		  <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php
the_title(); ?></a></h2>
		  <div class="entry-content">
			  <?php the_content("(Has click aqui para seguir leyendo...)"); ?>
			  <?php wp_link_pages(); ?>	    
		  </div>
		  <div class="entry-meta"><!--Por <?php the_author(); ?> --><strong>Categor&iacute;as: </strong><?php the_category(', ') ?><?php the_tags('<br /><strong>Tags: </strong>', ', ', ''); ?><?php edit_post_link('Editar', ' | ', ''); ?></div>
		  <div class="entry-comments"><?php comments_popup_link('Haz un comentario', '1 Comentario', '% Comentarios'); ?></div>
	 </div>
	 <?php endwhile; ?>
	 <div class="navigation">
        <?php if(class_exists('wp_pagination_plugin')){
                        $p = new wp_pagination_plugin;
		        $p->nextLabel(''); // removing text 'next'
		        $p->prevLabel(''); // removing text 'previous'
		        $p->nextIcon('►'); // changing the icon 'next'
		        $p->prevIcon('◄'); // changing the previous 'icon'
                        $p->show();
                }
		else
		{ posts_nav_link(); } ?>
	</div>
	 <?php endif; ?>
	</div>
	<div id="ie_clearing">
	     &nbsp;
	</div>
</div>

</div>
</div>
<?php get_footer(); ?>
SEARCH.PHP
Código:
<?php get_header(); ?>
<div id="before_main">
<div id="main">
<?php get_sidebar(); ?>
<div id="column3">
	<div id="column3_content" class="clearfix">
	 <?php if(have_posts()) : ?>
	 <?php while(have_posts()) : the_post(); ?>
	 <div class="post">
		<div class="post-date">
			<div class="post-month"><?php the_time('M') ?></div>
			<div class="post-day"><?php the_time('d') ?></div>
		</div>
		  <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php
the_title(); ?></a></h2>
		  <div class="entry-content">
			  <?php the_excerpt(); ?>
			  <?php wp_link_pages(); ?>	    
		  </div>
		  <div class="entry-meta"><!--Por <?php the_author(); ?>  --><strong>Categor&iacute;as: </strong><?php the_category(', ') ?><?php the_tags('<br /><strong>Tags: </strong>', ', ', ''); ?><?php edit_post_link('Editar', ' | ', ''); ?></div>
		  <div class="entry-comments"><?php comments_popup_link('Haz un comentario', '1 Comentario', '% Comentarios'); ?></div>
	 </div>
	 <?php endwhile; ?>
	 <div class="navigation">
        <?php if(class_exists('wp_pagination_plugin')){
                        $p = new wp_pagination_plugin;
		        $p->nextLabel(''); // removing text 'next'
		        $p->prevLabel(''); // removing text 'previous'
		        $p->nextIcon('►'); // changing the icon 'next'
		        $p->prevIcon('◄'); // changing the previous 'icon'
                        $p->show();
                }
		else
		{ posts_nav_link(); } ?>
	</div>
	 <?php endif; ?>
	</div>
	<div id="ie_clearing">
	     &nbsp;
	</div>
</div>

</div>
</div>
<?php get_footer(); ?>
Las dos paginas solo difieren en la linea 17, en donde la pagina search.php muestra <?php the_excerpt(); ?> y index.php muestra <?php the_content("(more)"); ?>

La busqueda en mi sitio funciona. Aun asi ¿esta bien extructurado search.php?

http://hydra1ysk.com