Liste aller Produkte

Um eine Liste aller Produkte zu erzeugen, erstellen sie eine neue Datei archive-product.php in Ihre Theme Ordner. Folgender Inhalt:

<?php get_header(); ?>
<div id=“content“>
<h2 class=“entry-title“>Unsere Produkte</h2>
<ul>
<?php
query_posts(‚post_type=produkt&post_status=publish‘);
if ( have_posts() ) : while ( have_posts() ) : the_post();
?>
<li><?php the_date(‚d.m.Y‘); ?> –
<a href=“<?php the_permalink(); ?>“ title=“Lesen Sie
&quot;<?php the_title(); ?>&quot;“><strong>
<?php the_title(); ?></strong></a></li>
<?php endwhile; endif; wp_reset_query(); ?>
</ul>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Rufen Sie nun Ihre Prdukliste mit dem folgenden Link auf:  https://<IhreDomain>/produkte