Supporto » Aspetto = Temi » Problema Tag Archivio

  • Buonasera a tutta la community WP. Ho un problema impostare le Tag al archive.php
    Questo è il mio file archive.php Qualcuno potrebbe aiutarmi? Infatti quando vado su un link http://www.nomesito.it/tag/nome-tag/ mi va nella pagina home page.

    <?php get_header(); ?>
    	<section id="slider">
        	<?php list_recent_posts(45, 'modified', 20,true); ?>
        </section>
        <div id="container">
    		<?php get_sidebar(); ?>
    		<section id="content">
    			<section class="block">
    			<h1><?php global $wp_query; $page = ((get_query_var('paged')) ? get_query_var('paged') : 1); query_posts( array ( 'orderby' => 'modified', 'cat' => get_query_var('cat'), 'posts_per_page' => 15, 'paged' => $page )); single_cat_title(); the_posts_pagination( array( 'mid_size'  => 2, 'screen_reader_text' => ('Pagina '. $page . ' di ' . $wp_query->max_num_pages), 'prev_text' => '<i class="fa fa-angle-double-left"></i>', 'next_text' => '<i class="fa fa-angle-double-right"></i>' ) ); ?></h1>
    
    			<div class="locandine">
    			<?php
    			if(have_posts()):
    			while(have_posts()):	the_post();
    				$episodi = array();
    				if($episodio = get_post_meta($post->ID, 'last-episode', true)) $episodi[] = $episodio;
    				if($episodio = get_post_meta($post->ID, 'last-episode-sub', true)) $episodi[] = $episodio . " (Sub)";
    			 ?>
    			<a href="<?php the_permalink(); ?>" class="locandina"<?php if($poster_url = get_post_meta($post->ID, 'poster-url', true)): ?> style="background-image: url(<?php echo $poster_url; ?>)"<?php elseif (has_post_thumbnail( $post->ID )) : ?> style="background-image: url(<?php echo wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' )[0]; ?>)"<?php endif; ?>>
    				<?php if($voto = get_post_meta($post->ID, 'imdb-rating', true)): ?><div class="voto"><?php echo $voto; ?></div><?php endif; ?>
    				<div class="titolo"><?php the_title(); ?></div>	
    				<?php if(count($episodi) > 0): ?><div class="genere"><?php echo implode("<br>",$episodi); ?></div><?php endif; ?>			
    			</a>
    			<?php endwhile; else: ?><i>Non ho trovato elementi da mostrare.</i><?php endif; wp_reset_query(); wp_reset_postdata(); ?>
    			</div>
    			
    			<div style="clear: both"></div>
    			</section>
    		</section>
    		<div style="clear: both"></div>
    		</div>
    	</div>
    <?php get_footer(); ?>
    • Questo topic è stato modificato 6 anni, 6 mesi fa da Jassy00.
    • Questo topic è stato modificato 6 anni, 6 mesi fa da Jassy00.
    • Questo topic è stato modificato 6 anni, 6 mesi fa da Jassy00.
    • Questo topic è stato modificato 6 anni, 6 mesi fa da Jassy00.
Stai visualizzando 1 risposte (di 1 totali)
Stai visualizzando 1 risposte (di 1 totali)
  • Il topic ‘Problema Tag Archivio’ è chiuso a nuove risposte.