Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/01/2011, 07:10
Avatar de NUCKLEAR
NUCKLEAR
Moderador radioactivo
 
Fecha de Ingreso: octubre-2005
Ubicación: Cordoba-Argentina
Mensajes: 5.688
Antigüedad: 18 años, 6 meses
Puntos: 890
Problemas con los comentarios.

Buenos días, tengo una plantilla que me muestra debajo del single(del post) un listado de 16 entradas referido a la misma categoria y debajo el comentario. Bien les paso a mostrar la plantilla single,php

Código PHP:
Ver original
  1. <?php get_header(); ?>
  2.  
  3. <div id="content">
  4.  
  5. <div class="postsbody">
  6. <?
  7. global $options;
  8. foreach ($options as $value) {
  9.   if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
  10. }
  11. ?>
  12.  
  13.  
  14. <div class="featured2">
  15. <h2><?php the_title(); ?></h2>
  16. <div style="padding:0px 0 10px 0px;">
  17. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  18.  
  19. <div class="fpost">
  20.  
  21. <div class="embed">
  22. <?php echo get_post_meta($post->ID, "embed", true); ?>
  23. </div>
  24.                                 <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
  25.  
  26.                                 <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
  27.  
  28.  
  29. </div>
  30.  
  31. <div class="pviews">
  32. <div class="pratings">Ratings: <?php if(function_exists('the_ratings')) { the_ratings(Ratings); } ?></div>
  33. <div style="text-align:right;"><?php if(function_exists('the_views')) { the_views(); } ?></div>
  34. </div>
  35. <br /><br />
  36. <div align="center">Copialo y pegalo en tu web : <br />
  37. <textarea cols="88" rows="2" onclick='this.select()'><?php echo mvb_embed_code('the_ID()', 430, 350); ?><br /></textarea>
  38. </div>
  39.  
  40. <div align="center">
  41. <?php if (function_exists('sociable_html')) {
  42.     echo sociable_html();
  43. } ?>
  44. </div>
  45.  
  46. <?php // [B]comments_template();[/B] ?>
  47.  
  48. <div class="featured">
  49. <h2>Videos relacionados</h2>
  50.  
  51.  
  52. <?php  include (TEMPLATEPATH . '/adsense/adsense-aff-single.php'); ?>
  53.  
  54. <div style="padding:0 0 15px 20px;">
  55.  
  56. <?php $category = get_the_category(); $currentcat = $category[0]->cat_ID; ?>
  57. <?php $recent = new WP_Query("cat=".$currentcat."&showposts=16"); ?>
  58.  
  59. <?php while($recent->have_posts()) : $recent->the_post();?>
  60. <div class="videopart">
  61.  
  62. <div class="thumbnail">
  63. <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php echo post_custom('mvb_thumb_url'); ?>" width="120" height="90" alt="<?php the_title(); ?>" /></a>
  64. </div>
  65.  
  66. <div class="fpost">
  67. <h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
  68. <p><?php if(function_exists('the_views')) { the_views(); } ?></p>
  69. <p><?php if(function_exists('the_ratings')) { the_ratings(); } ?></p>
  70. </div>
  71.  
  72. </div>
  73.  
  74.  
  75. <?php endwhile; ?>
  76. </div>
  77. </div>
  78.  
  79. <?php comments_template( '', true );   ?>
  80.  
  81. <?php  endwhile; endif; ?>
  82.  
  83. </div>
  84. </div>
  85.  
  86.  
  87. </div>
  88.  
  89. <?php include (TEMPLATEPATH . '/sidebar_right_2.php'); ?>
  90.  
  91. </div>
  92.  
  93. <?php get_footer(); ?>

Si lo pongo asi como esta me muestra los comentarios pero englobados en la categoria a la cual pertenece el post, es decir los comentarios que se hacen de cada entrada me los muestra a todos de la categoria y no discrimina por post.

Sin embargo si lo muestro como esta mas arriba

<?php // comments_template(); ?>

Me muestra ok, pero no lo quiero en ese orden. He estado viendo la ayuda de Wordpress con respecto a las funciones pero no lo he podido resolver de ningun modo.

Obviamente algo globalmente esta afectando que se muestre los comentarios por post. Pero la pregunta es ¿que?

Saludos.
__________________
Drupal Argentina