
Originariamente inviata da
Alhazred
Di che stiamo parlando? Di Wordpress?
Stai seguendo il framework o stai facendo una pagina tua e vuoi usare le funzioni native di WP senza rispettarne il framework?
Nel secondo caso è ovvio che non funzioni.
Sto facendo una pagina mia. Il programma completo è + complesso. Quando ho visto che non girava il tag, ho eliminato tutto, tranne la cosa che mi interessava.
codice:
<?php get_header(); ?>
<!-- Inizio Content -->
<div id=”main” role=”main”>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article>
<header>
<h3><?php the_title(); ?></h1>
<div class=”meta”>
<time datetime="<?php the_date( 'c' ); ?>" pubdate>
<?php the_time( get_option('date_format') ); ?>
</time>
<span class="autore">
Scritto da: <?php the_author_link(); ?>
</span>
<span class="cat">
Categorie: <?php the_category( ',' ); ?>
</span>
</div>
</header>
<section class="contenuto-art">
<?php the_content("Continua a Leggere"); ?>
</section>
<footer>
<?php the_tags('Tags: ', ', ', '<br />'); ?>
</footer>
</article>
<?php endwhile; else: ?>
<!-- Aggiungere un messaggio di errore -->
<?php endif; ?>
</div>
<?php get_sidebar(); ?>