wp-duckbehaviorjournal/index.php
Kumi c61ba4a695
feat: add new WordPress theme for Duck Behavior Journal
- Set up a new WordPress theme with custom logo, header image, and menus
- Implement the WP Bootstrap Navwalker for improved navigation
- Add Bootstrap and jQuery for styling and functionality
- Customize hero section via the Customizer API
- Include footer with customizable text and social media links
- Integrate featured articles and page templates
- Enhance styles with a dedicated CSS file

References: #123, #124

This addition provides a modern, responsive design tailored to the Duck Behavior Journal, enhancing user engagement and site navigation.
2024-06-20 09:22:10 +02:00

39 lines
No EOL
2 KiB
PHP

<?php get_header(); ?>
<!-- Hero Section -->
<section class="hero text-center text-white d-flex align-items-center" style="background-image: url('<?php echo get_theme_mod('hero_image', get_template_directory_uri() . '/assets/img/hero.png'); ?>');">
<div class="container">
<h1 class="display-4"><?php echo get_theme_mod('hero_title', 'Advancing the Understanding of Duck Behavior'); ?></h1>
<p class="lead"><?php echo get_theme_mod('hero_subtitle', 'Through Rigorous Scientific Research'); ?></p>
<a href="<?php echo get_theme_mod('hero_primary_button_url', '#'); ?>" class="btn btn-primary"><?php echo get_theme_mod('hero_primary_button_text', 'Submit Your Research'); ?></a>
<a href="<?php echo get_theme_mod('hero_secondary_button_url', '#'); ?>" class="btn btn-secondary"><?php echo get_theme_mod('hero_secondary_button_text', 'Subscribe to the Journal'); ?></a>
</div>
</section>
<!-- Featured Articles -->
<section class="container my-5">
<h2 class="text-center mb-4">Featured Articles</h2>
<div class="row">
<?php
$args = array('post_type' => 'post', 'posts_per_page' => 3);
$loop = new WP_Query($args);
while ($loop->have_posts()) : $loop->the_post();
?>
<div class="col-md-4">
<div class="card mb-4 shadow-sm">
<?php if (has_post_thumbnail()) : ?>
<img src="<?php the_post_thumbnail_url(); ?>" class="card-img-top" alt="<?php the_title(); ?>">
<?php endif; ?>
<div class="card-body">
<h5 class="card-title"><?php the_title(); ?></h5>
<p class="card-text"><?php the_author(); ?> | <?php the_date(); ?></p>
<a href="<?php the_permalink(); ?>" class="btn btn-outline-primary">Read More</a>
</div>
</div>
</div>
<?php endwhile;
wp_reset_query(); ?>
</div>
</section>
<?php get_footer(); ?>