PATH:
home
/
nappmpmd
/
bestyment.online
/
wp-content
/
themes
/
wvc-theme
<?php /** * Home Template * * This template displays the home page with blog posts in a modern card layout. * It shows a list of posts with pagination and appropriate headers. * * @package WVC_Theme * @subpackage Templates * @author 10Web * @since 1.0.0 * @version 1.0.0 * @link https://github.com/your-repo/wvc-theme */ get_header(); $empty_vibecode_site = \WVC\Core\Core::is_empty_vibecode_site(); if (!$empty_vibecode_site) : remove_filter( 'the_content', 'wpautop' ); // Include empty page template if no content include get_template_directory() . '/wvc-empty-page.php'; get_footer(); return; endif; ?> <main class="site-main bg-white min-h-screen"> <div class="container mx-auto px-4 py-8"> <div class="max-w-7xl mx-auto"> <?php if ( have_posts() ) : ?> <header class="page-header mb-12 text-center"> <h1 class="page-title text-4xl font-bold text-black mb-4"> <?php if ( is_home() && ! is_front_page() ) { single_post_title(); } else { _e( 'Latest Posts', 'wvc-theme' ); } ?> </h1> <div class="archive-description text-lg text-gray-600 max-w-3xl mx-auto"> <?php if ( is_home() && ! is_front_page() ) { $page_for_posts = get_option( 'page_for_posts' ); if ( $page_for_posts ) { $page = get_post( $page_for_posts ); if ( $page ) { echo apply_filters( 'the_content', $page->post_content ); } } } else { _e( 'Discover our latest articles and insights', 'wvc-theme' ); } ?> </div> </header> <div class="posts-container"> <div class="grid grid-cols-1 lg:grid-cols-3 gap-8"> <?php while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class( 'post bg-white border border-gray-500 rounded-lg overflow-hidden hover:border-primary-500 transition-colors duration-300' ); ?>> <?php if ( has_post_thumbnail() ) : ?> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?>" class="block"> <?php the_post_thumbnail( 'wvc-featured', array( 'class' => 'w-full h-48 object-cover' ) ); ?> </a> </div> <?php endif; ?> <div class="p-6"> <header class="post-header mb-4"> <h2 class="post-title text-xl font-semibold text-black mb-3"> <a href="<?php the_permalink(); ?>" class="hover:text-primary-500 transition-colors duration-300"><?php the_title(); ?></a> </h2> <div class="post-meta text-sm text-gray-600 space-x-4"> <span class="post-date"> <time datetime="<?php echo get_the_date( 'c' ); ?>"> <?php echo get_the_date(); ?> </time> </span> <span class="post-author"> <?php _e( 'by', 'wvc-theme' ); ?> <?php the_author(); ?> </span> <?php if ( has_category() ) : ?> <span class="post-categories"> <?php the_category( ', ' ); ?> </span> <?php endif; ?> </div> </header> <div class="post-content"> <div class="text-gray-700 mb-4 line-clamp-3"> <?php the_excerpt(); ?> </div> <a href="<?php the_permalink(); ?>" class="inline-block bg-primary-500 text-white px-6 py-2 rounded-md hover:bg-primary-600 transition-colors duration-300"> <?php _e( 'Read More', 'wvc-theme' ); ?> </a> </div> </div> </article> <?php endwhile; ?> </div> </div> <?php // Pagination with Tailwind styles $pagination = get_the_posts_pagination( array( 'mid_size' => 2, 'prev_text' => __( 'Previous', 'wvc-theme' ), 'next_text' => __( 'Next', 'wvc-theme' ), ) ); // Apply Tailwind classes to pagination $pagination = str_replace( array( '<nav class="navigation pagination"', '<div class="nav-links"', '<span aria-current="page" class="page-numbers current"', '<a class="page-numbers"', '<a class="prev page-numbers"', '<a class="next page-numbers"', ), array( '<nav class="navigation pagination mt-12"', '<div class="nav-links flex justify-center items-center space-x-2"', '<span aria-current="page" class="page-numbers current bg-primary-500 text-white px-4 py-2 rounded-md"', '<a class="page-numbers bg-white border border-gray-500 text-black px-4 py-2 rounded-md hover:bg-primary-500 hover:text-white transition-colors duration-300"', '<a class="prev page-numbers bg-white border border-gray-500 text-black px-4 py-2 rounded-md hover:bg-primary-500 hover:text-white transition-colors duration-300"', '<a class="next page-numbers bg-white border border-gray-500 text-black px-4 py-2 rounded-md hover:bg-primary-500 hover:text-white transition-colors duration-300"', ), $pagination ); echo $pagination; ?> <?php else : ?> <section class="no-results bg-gray-100 rounded-lg p-8 text-center"> <header class="page-header mb-6"> <h1 class="page-title text-3xl font-bold text-black mb-4"><?php _e( 'No posts found', 'wvc-theme' ); ?></h1> </header> <div class="page-content"> <p class="text-gray-700 mb-6"><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'wvc-theme' ); ?></p> <div class="max-w-md mx-auto"> <?php get_search_form(); ?> </div> </div> </section> <?php endif; ?> </div> </div> </main> <?php get_footer(); ?>
[-] wvc-header.php
[edit]
[-] shop.php
[edit]
[+]
..
[-] README.md
[edit]
[-] BUILD.md
[edit]
[-] header.php
[edit]
[-] archive-product.php
[edit]
[-] wvc-empty-page.php
[edit]
[-] functions.php
[edit]
[-] wvc-footer.php
[edit]
[-] single.php
[edit]
[-] wvc-archive.php
[edit]
[+]
assets
[-] index.php
[edit]
[+]
includes
[-] screenshot.png
[edit]
[-] home.php
[edit]
[-] 404.php
[edit]
[-] wvc-shop.php
[edit]
[-] searchform.php
[edit]
[-] footer.php
[edit]
[-] sidebar.php
[edit]
[+]
app
[-] archive.php
[edit]
[-] page.php
[edit]
[-] wvc-page.php
[edit]
[-] git_pre_commit_hook.sh
[edit]
[-] wvc-single.php
[edit]
[-] api.md
[edit]
[-] single-product.php
[edit]
[+]
vendor
[-] style.css
[edit]
[-] comments.php
[edit]
[-] search.php
[edit]