checkvorteil/archive-kitool.php
2025-06-16 15:14:17 +02:00

87 lines
3.6 KiB
PHP

<?php
// filepath: /home/michi/landingpages/checkvorteil-wordpress/archive-kitool.php
get_header(); ?>
<section class="hero" style="padding: 3rem 0 5rem;">
<div class="container">
<h1 class="gradient-text">Die besten KI-Tools für 2024</h1>
<p>Entdecken Sie die revolutionärsten KI-Tools, die Ihr Business transformieren werden. Von Content-Erstellung bis Automatisierung - hier finden Sie die perfekte Lösung.</p>
</div>
</section>
<div class="container">
<section class="section">
<?php if (have_posts()) : ?>
<div class="grid grid-3">
<?php while (have_posts()) : the_post();
$rating = get_post_meta(get_the_ID(), '_kitool_rating', true);
$price = get_post_meta(get_the_ID(), '_kitool_price', true);
$category = get_post_meta(get_the_ID(), '_kitool_category', true);
$features = get_post_meta(get_the_ID(), '_kitool_features', true);
$features_array = $features ? explode("\n", $features) : array();
?>
<article class="card">
<div style="display: flex; justify-content: space-between; align-items: start; margin-bottom: 1rem;">
<div>
<h3><?php the_title(); ?></h3>
<?php if ($category) : ?>
<span class="category-tag"><?php echo esc_html($category); ?></span>
<?php endif; ?>
</div>
<div style="text-align: right;">
<?php if ($rating) : ?>
<div style="color: #fbbf24; margin-bottom: 0.5rem;">
<?php echo str_repeat('★', $rating) . str_repeat('☆', 5 - $rating); ?>
</div>
<?php endif; ?>
<?php if ($price) : ?>
<div style="color: #c084fc; font-weight: bold;">
<?php echo esc_html($price); ?>
</div>
<?php endif; ?>
</div>
</div>
<p><?php the_excerpt(); ?></p>
<?php if (!empty($features_array) && count($features_array) > 0) : ?>
<div style="margin: 1rem 0;">
<?php foreach (array_slice($features_array, 0, 3) as $feature) : ?>
<div style="display: flex; align-items: center; color: #9ca3af; font-size: 0.875rem; margin-bottom: 0.25rem;">
<span style="color: #c084fc; margin-right: 0.5rem;">⚡</span>
<?php echo esc_html(trim($feature)); ?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<a href="<?php the_permalink(); ?>" class="btn btn-primary" style="width: 100%; justify-content: center; margin-top: 1rem;">
Mehr erfahren
</a>
</article>
<?php endwhile; ?>
</div>
<?php
// Pagination
the_posts_pagination(array(
'mid_size' => 2,
'prev_text' => '← Zurück',
'next_text' => 'Weiter →',
));
?>
<?php else : ?>
<div style="text-align: center; padding: 3rem 0;">
<p style="color: #9ca3af; font-size: 1.125rem;">
Noch keine KI-Tools verfügbar.
</p>
</div>
<?php endif; ?>
</section>
</div>
<?php get_footer(); ?>