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

106 lines
3.5 KiB
PHP

<?php
// filepath: /home/michi/landingpages/checkvorteil-wordpress/index.php
get_header(); ?>
<!-- Hero Section -->
<section class="hero">
<div class="container">
<h1 class="gradient-text">
<?php echo get_theme_mod('hero_title', 'CheckVorteil'); ?>
</h1>
<p>
<?php echo get_theme_mod('hero_subtitle', 'Die besten Tools, Blog-Artikel und Services für Online-Business-Optimierung'); ?>
</p>
<div class="cta-buttons">
<a href="/ki-tools" class="btn btn-primary">
⚡ KI-Tools entdecken
</a>
<a href="/blog" class="btn btn-secondary">
📚 Blog lesen
</a>
</div>
</div>
</section>
<!-- Services Preview -->
<?php
$services = new WP_Query(array(
'post_type' => 'service',
'posts_per_page' => 6,
'post_status' => 'publish'
));
if ($services->have_posts()) : ?>
<section class="section section-alt">
<div class="container">
<div class="section-header">
<h2 class="section-title gradient-text">Unsere Services</h2>
<p class="section-subtitle">Spezialisierte Lösungen für Ihr Online-Business</p>
</div>
<div class="grid grid-3">
<?php while ($services->have_posts()) : $services->the_post(); ?>
<article class="card">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p><?php the_excerpt(); ?></p>
<a href="<?php the_permalink(); ?>" class="card-link">
Mehr erfahren →
</a>
</article>
<?php endwhile; ?>
</div>
<div style="text-align: center; margin-top: 3rem;">
<a href="<?php echo get_post_type_archive_link('service'); ?>" class="btn btn-secondary">
Alle Services anzeigen →
</a>
</div>
</div>
</section>
<?php endif; wp_reset_postdata(); ?>
<!-- Blog Preview -->
<?php
$blog_posts = new WP_Query(array(
'post_type' => 'post',
'posts_per_page' => 3,
'post_status' => 'publish'
));
if ($blog_posts->have_posts()) : ?>
<section class="section">
<div class="container">
<div class="section-header">
<h2 class="section-title gradient-text">Neueste Artikel</h2>
<p class="section-subtitle">Aktuelle Insights und Strategien für Ihr Online-Business</p>
</div>
<div class="grid grid-3">
<?php while ($blog_posts->have_posts()) : $blog_posts->the_post(); ?>
<article class="card">
<?php
$categories = get_the_category();
if (!empty($categories)) :
?>
<span class="category-tag"><?php echo esc_html($categories[0]->name); ?></span>
<?php endif; ?>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p><?php the_excerpt(); ?></p>
<a href="<?php the_permalink(); ?>" class="card-link">
Weiterlesen →
</a>
</article>
<?php endwhile; ?>
</div>
<div style="text-align: center; margin-top: 3rem;">
<a href="<?php echo get_permalink(get_option('page_for_posts')); ?>" class="btn btn-secondary">
Alle Artikel anzeigen →
</a>
</div>
</div>
</section>
<?php endif; wp_reset_postdata(); ?>
<?php get_footer(); ?>