• Estoy creando un theme para una banda reconocida y para ello necesito crear un index.php con multiples loop en el.. la cosa es que pillé un loop por ahi que no me repite el contenido de los posts en los diferentes loops (funciona a la prefeccion ) pero ahora no me genera la paginacion necesaria para usarla con wp-pagenavi (plugin). dejo el codigo por si me pueden ayudar a pillar el error.

    <?php get_header();?>
    
    <div id="slider">
      <div class="contenido">
        <div id="slide">
    
    <?php /* Start non-duplicates */
    function post_strip($where) {
    	global $myPosts, $wpdb;
    	$where .= " AND $wpdb->posts.ID not in($myPosts) ";
    	return $where;
    }
    ?>
    <?php
    global $myPosts;
    $myPosts = '';
    ?>
    
    <?php
    $my_query = new WP_Query();
    $my_query->query('cat=7&showposts=3');
    if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <?php $myPosts .= $post->ID . ","; ?>    
    
        <div class="img_slider"href=""><a href="<?php the_permalink();?>"><?php the_post_thumbnail('slider', array('class' => 'aligncenter', 'alt' => 'Noticia', 'title' =>get_the_title()."<br /><div>".get_the_excerpt())); ?></a></div>
    
        <!--<div id="htmlcaption" class="nivo-html-caption"><a href="<?php the_permalink();?>"><div class="titulo_slider"><?php the_title('');?></div><br /><div class="txt_slider"><?php the_excerpt();?></div></a></div> -->
    
        <?php endwhile;?>
        <?php endif;?>
        <?php wp_reset_query(); ?>
        </div>
      </div>
    </div>
    
    <div class="clear"></div>
    <div id="principal" class="clearfix">
      <div class="contenido">
    
        <div id="wrap">
    
            <div id="titulo_pagina">Noticias</div>
    
            <div id="contenedor">
    
                  <?php include (TEMPLATEPATH . '/loop.php'); ?>
                  <!--<div id="noticia_principal">
                    <div class="imagen_not_principal"><img src="img/noticia.jpg" alt="" /></div>
                    <div class="titulo_noticia">Listado de Próximos Eventos a Realizar</div>
                    <div class="texto_noticia">As Northern Irish music reaches new heights and goes in new and exciting directions, we want You join the likes of                                           Fighting With Wire, Kasper Rosa, A Plastic Rose, And So I Watch You From Afar, Colenso Parade and Axis Of in reminding                                           us of why we do this, as well as providing the fuel.</div>
                    <div class="more-link"><a href="interior.html">Sigue Leyendo</a></div>
                    <div class="linearoja"></div>
                  </div> -->
    
                  <div id="noticias_secundarias">
    
    <?php $myPosts .= "0" ?>
    <?php add_filter('posts_where', 'post_strip'); ?>
    
    <?php $my_query = new WP_Query('cat=6,5,7&showposts=2');
    while ($my_query->have_posts()) : $my_query->the_post();?>
    
           <div id="noticia_secundaria">
              <div class="izq">
                 <div class="titulo_noticia"><a href="<?php the_permalink () ?>"><?php the_title () ?></a></div>
                 <div class="texto_noticia_sec"><?php wpe_excerpt('wpe_excerptlength_secundaria', 'wpe_excerptmore'); ?></div>
                 <div class="more-link"><a href="<?php the_permalink();?>">Sigue Leyendo</a></div>
              </div>
    
              <div class="der">
                 <div class="imagen_not_secundaria"><a href="<?php the_permalink();?>"><?php the_post_thumbnail('secundarias', array('class' => 'aligncenter', 'alt' => 'Noticia', 'title' => '')); ?></a></div>
              </div>
    
           </div><!--fin noticia-->
    
           <div class="linearoja"></div>
    
              <?php endwhile; ?>
    <?php remove_filter('posts_where', 'post_strip'); ?>
    <?php /* End non-duplicates  */ ?>
    
                  </div>
    
            </div>
    
            <div id="contenedor">
    	    <div id="navi"><?php wp_pagenavi(); ?>
                  <div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    	        </div>
    
              </div>
            </div>
    
            <div id="titulo_pagina">Discografia</div>
    
            <div id="contenedor">
              <?php include (TEMPLATEPATH . '/discos.php'); ?>
            </div>
    
        </div>
    
    <?php get_sidebar()?>
    
    <?php get_footer();?>
Viendo 1 respuesta (de un total de 1)
Viendo 1 respuesta (de un total de 1)
  • El debate ‘post antiguos no aparecen con wp pagenavo’ está cerrado a nuevas respuestas.