• Hi i have this template i would like to just display 10 items, because right now in general options in wordpress i have 5 items but i would like to make an exception with this template:

    <?php
    /*
    Template Name: Blog List
    */
    ?>
    <?php get_header(); ?>
    <div class="content-wrap">
    	<div class="content">
    		<?php tie_breadcrumbs() ?>
    
    <div id="content" class="podcast_archive">
    
    		<!--<div class="podcast_full">-->
    
    			<?php if ( have_posts() ) : ?>
    
    				<header><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    					<h1><?php _e( 'El Jurado del Pueblo' , 'ss-podcasting' ); ?></h1>
    				</header>
    
    				<?php
    				$feed_url = trailingslashit( home_url() ) . '?feed=podcast';
    				$custom_feed_url = get_option('ss_podcasting_feed_url');
    				if( $custom_feed_url && strlen( $custom_feed_url ) > 0 && $custom_feed_url != '' ) {
    					$feed_url = $custom_feed_url;
    				}
    				$itunes_url = str_replace( array( 'http:' , 'https:' ) , 'itpc:' , $feed_url );
    				?>
    
    				<section>
    
    					<?php
    					/* Start the Loop */
    					while ( have_posts() ) : the_post(); ?>
    
    						<?php
    						$terms = wp_get_post_terms( get_the_ID() , 'series' );
    						foreach( $terms as $term ) {
    							$series_id = $term->term_id;
    							$series = $term->name;
    							break;
    						}
    						?>
    
    						<article class="podcast_episode">
    
    							<?php if( has_post_thumbnail() ) { ?>
    								<?php $img = wp_get_attachment_image_src( get_post_thumbnail_id() ); ?>
    								<a>" title="<?php the_title(); ?>">
    									<?php the_post_thumbnail( 'podcast-thumbnail' , array( 'class' => 'podcast_image' , 'alt' => get_the_title() , 'title' => get_the_title() ) ); ?>
    								</a>
    							<?php } ?>
    
    							<h3>
    								<strong><?php the_title(); ?></strong>
    								<div class="podcast_meta"><?php echo $series; ?><aside></div>
    							</h3>
    
    <div id="audio">
    <?php global $ss_podcasting;
    $enclosure = $ss_podcasting->get_enclosure( get_the_ID() );
    if( $enclosure ) {
        $audio_player = $ss_podcasting->audio_player( $enclosure );
        echo $audio_player;
    } ?>
    <?php the_content(); ?>
    </div>
    <div id="audioinfo">
    <a>">Descargar Audio</a>
    <span class="audiometa">
    Tama?o: <?php echo get_post_meta(get_the_ID(), 'filesize', true) ?>
    </span>
    </div>
    
    <?php echo do_shortcode('[divider]');?>
    </article>
    					<?php
    					endwhile;
    					?>
    
    				</section>
    
    			<?php endif; ?>
    <?php wp_pagenavi(); ?>
    
    			<div class="podcast_clear"></div>
    
    		</div>
    
    		<?php comments_template( '', true ); ?>
    	</div><!-- .content -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    ?>

    thank you

Viewing 1 replies (of 1 total)
  • Try replacing this:

    <!--<div class="podcast_full">-->
    
    			<?php if ( have_posts() ) : ?>

    with this:

    <!--<div class="podcast_full">-->
    			<?php
    			global $wp_query;
    			query_posts(
    			   array_merge(
    			      $wp_query->query,
    			      array('posts_per_page' => 10)
    			   )
    			);
    			?>
    			<?php if ( have_posts() ) : ?>
Viewing 1 replies (of 1 total)
  • The topic ‘display just 10 items in custom template’ is closed to new replies.